Getting the ID of a ListView row item from a button click

by e-satis » Wed, 08 Apr 2009 01:35:51 GMT


Sponsored Links
 Hello,

Each row of my view look like that :

<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
    android:id="@+id/row_layout" >

    <LinearLayout android:id="@+id/row_checkbox_container">

        <CheckBox android:id="@+id/row_checkbox" />

    </LinearLayout>

   <LinearLayout android:id="@+id/item_title_container">

        <TextView android:id="@+id/item_title"/>

    </LinearLayout>

    <LinearLayout android:id="@+id/right_arrow_container" >

         <ImageButton android:id="@+id/arrow" />

    </LinearLayout>

</LinearLayout>

When I click on the ImageButton "arrow", I trigger a method than need
the id of the row to perform. By ID I mean the value of the field
"_id" of the corresponding record in database.

I did not find a direct way to do it, but I think I can  if I get the
index of the row in the ListView. Again, I don't know how to get this
index from a click to a childview.

Any help much appreciated !
--~--~---------~--~----~------------~-------~--~----~



Getting the ID of a ListView row item from a button click

by e-satis » Wed, 22 Apr 2009 04:54:15 GMT


 Solved it the same way than in


Sponsored Links


Getting the ID of a ListView row item from a button click

by e-satis » Tue, 12 May 2009 16:44:22 GMT


 Because I was planing on adding something afterward in it.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Graphing nodes and edges

has anyone worked on creating a graph of various vertices and edges
connecting them? i would like to be able to create an app that does
this but having a hard time with being able to create these drawable
vertices and then allow the user to draw them any where on a canvas? i
have a feeling that i am over complicating this. any ideas or guidance
would be helpful thanks

-- 

2. Nanya dunk a pe ka Root explorer

Salam all,

ada yang punya a pe ka root explorer gak?

Trims,

-- 
-----------------------
@ZuliadyAzwin <http://twitter.com/zuliadyazwin>

"Design is not just what it looks like and feels like. Design is how it
works" - Steve Jobs

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

3. upgrade wiigo Firmware 1.6 to Android 2.1 Eclaire

4. install samdroidkitchn gmn ya???

5. SPICA sh

6. Indeterminate ProgressDialog Spinner Stops

7. help... android market dissapear