0

I am developing an android application using a ListViewas a main interface. Each item in the List contains TextView and Button. When the Button is visible the item selection does not work and when the button is not visible the item selection work without problem. This problem is not reproduced if I change the button by an ImageView.

Is there a solution to make the item selection work when the Button is visible?

Swayam
  • 16,294
  • 14
  • 64
  • 102
MOHAMED
  • 41,599
  • 58
  • 163
  • 268

1 Answers1

2

Directly we can't set the click option for both List item and the Button. So we have to use the custom adapter.

Try this example : http://code.google.com/p/codemobiles/source/browse/CustomListViewDemo/

Click is not working on the Listitem Listview android

Community
  • 1
  • 1
Rajesh Rajaram
  • 3,271
  • 4
  • 29
  • 48