Sunday, October 13, 2013

[android-developers] Selecting an radio button item in a multi page list

Hi,

I have a list that is multiple pages long, and I'm trying to get the list index of the item that is selected using radio buttons. In onClickRadioButton() which I'm passing in my current View, I'm setting the myview as view.getParent() and the list index as ((ViewGroup) myview.getParent()).indexOfChild(myview).

The listindex is correct (starts from 0) when the list is 1 page long, but whenever I scroll down a list that's longer than a page, the list index gets reset to 0 based on the item that's on the top of the page. Does anyone know what I'm doing wrong? Does is have anything to do with my View and getParent()?

Thanks!

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate