0
我有一个ListView
,它的一个TextView
a ToogleButton
。现在我必须为我的ListView
实施上下文菜单。但是,如果切换按钮可见,则上下文菜单不会显示。 onListItemClick
也不起作用。为什么? 上下文菜单和ListView行中的ToggleButton
我有一个ListView
,它的一个TextView
a ToogleButton
。现在我必须为我的ListView
实施上下文菜单。但是,如果切换按钮可见,则上下文菜单不会显示。 onListItemClick
也不起作用。为什么? 上下文菜单和ListView行中的ToggleButton
@ChiragRaval,我找到了解决方案。
android:focusable="false"
为ToggleButton
是我所需要的。现在ToggleButton
和上下文菜单都可以工作。
上下文菜单将在onLongClick监听器上工作。 – 2013-03-05 12:49:07