IIRC, adding a button in a custom view for a listview disables the onListItemClick event.
This SO thread talks about using TouchDelegate in that case, but I've never tried it. On Apr 12, 8:52 am, Codevalley <[email protected]> wrote: > Hi, > I was trying to use a ListActivity which uses a custom Adapter. Every > list element is a complex collection of objects which include buttons, > checkboxes etc (which also have onClickListeners). > Now, the problem is the onListItemClick is not even invoked when a > list element is selected. I tried everything possible but am not able > to get the selection. Using the trackball I am able to bring focus to > the list elements, but am not able to get the call back. But, on > touching, I am not even getting the focus. > > I tried these steps unsuccessfully to solve the problem. > * Tried removing onClickListeners from the listElement Objects. > * Tried making all the objects non-focussable, by modifying the XML > (as suggested by Romain Guy). > > Can anybody shed some light into this issue? > I have compiled this code in Android SDK 1.6 and have tested in both > 1.6 and 2.1 phones. > > thank you. > -Codevalley -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

