I have a Gridview filled by an Adapter which returns LinearLayouts each contains an ImageButton and TextView.
In the adapter I am binding an onClick and onLongClick
Do not use clickable objects in the grid. In that case Android cannot handle the click event of GridView
.
Instead, use something to show a similar user interface view. Then handle that object's click actions.
Don't: put Button
in the GridView
to perform some click actions.
Do: put an ImageView
instead of ImageButton
and handle ImageView
's click events.