开发者

Checkbox Context Menu

开发者 https://www.devze.com 2023-01-01 21:59 出处:网络
I have a ListView and an adapter in w开发者_如何学Pythonhick I create a linear layout and return as my created element.

I have a ListView and an adapter in w开发者_如何学Pythonhick I create a linear layout and return as my created element. When this linear layout is just TextViews, the context menu appears normally, When I add a checkbox to the layout, the context menu isn't shown. Is there any solution to this problem ?


The difference is that when there is a clickable element on your ListView, like a checkbox, that element handles clicks, not the ListView. Thus, you would need to add the context menu to the checkbox, not the ListView. Since a TextView is not clickable, it allows the click to pass through to the ListView.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号