[android-developers] Re: Getting the ID of a ListView row item from a button click

2009-05-12 Thread e-satis

Because I was planing on adding something afterward in it.

On Apr 21, 11:48 pm, Marco Nelissen marc...@android.com wrote:
 Why are you wrapping each checkbox in its own linearlayout?

 On Tue, Apr 7, 2009 at 10:35 AM, e-satis info.ksam...@googlemail.comwrote:



  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 !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting the ID of a ListView row item from a button click

2009-04-21 Thread e-satis

Solved it the same way than in
http://groups.google.com/group/android-developers/browse_thread/thread/16e2f50d9a46823a/fc448b80b6ae29cc?lnk=gstq=e-satis,
adding the id to the view manually.

On Apr 7, 7:35 pm, e-satis info.ksam...@googlemail.com wrote:
 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 !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Getting the ID of a ListView row item from a button click

2009-04-21 Thread Marco Nelissen
Why are you wrapping each checkbox in its own linearlayout?


On Tue, Apr 7, 2009 at 10:35 AM, e-satis info.ksam...@googlemail.comwrote:


 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 !
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---