Basically, I would like to implement a GridView wherein the items themselves are clickable, but within the GridView are clickable Buttons and Checkboxes.
Here's a sample layout:
Gridview
-----------------------------------------
|[ImageView] |[ImageView] |
|[TextView] |[TextView] |
|[Button][Checkbox] |[Button][Checkbox] |
-----------------------------------------
|[ImageView] |[ImageView] |
|[TextView] |[TextView] |
|[Button][Checkbox] |[Button][Checkbox] |
-----------------------------------------
Basically, what i want to do is, when the user clicks the CheckBox, multiple items can now be selected from the GridView. When the users clicks the Button, A Popup is shown. When the user clicks anywhere else, a new Activity is started. The whole point of this is instead of long-pressing to show the context menu, I would like a button to take its place.
Any suggestions on how I can approach this scenario? In my current setup, if I add the Button within the adapter's GetView() method, only the Button is clickable. The whole GridView item is not clickable. When I remove the Button, the GridView item is clickable again. It seems that it's only the whole GridView Item or the Button is clickable (responds to OnClickListener(). Is there a way to make them both clickable?