views:

109

answers:

1

I have a ListView and an adapter in whick 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 ?

+2  A: 

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.

Mayra