Android: Grid view with clickable grid items and nested views (buttons, checkboxes)

前端 未结 2 1915
花落未央
花落未央 2021-01-06 07:33

Basically, I would like to implement a GridView wherein the items themselves are clickable, but within the GridView are clickable Button

2条回答
  •  广开言路
    2021-01-06 08:25

    You can make an item xml and use it as your gridView item. Then with an adapter initialize the buttons and checkboxes in your gridView. After you can add your clickListener not to the gridView items, but to the layout in the item xml, so it's child views won't respond to the click event.

提交回复
热议问题