简体   繁体   中英

Question about onListItemClick in ListActivity

I have a ListActivty and I overload the onListItemClick(ListView listView, View view, int position, long id) in my List Activity.

My question is why onListItemClick() not getting called back (i have breakpoint in my debugger) when I have an ImageButton in my list item view (the one view created by my list adaptor from cursor)?

Thank you.

Is the button's click occurring, but not the list item? This might be a focus problem where the button is taking the focus away from the list item. Try setting myImageButton.setFocusable(false);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM