Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个ListView,谁的TextView一个ToogleButton。现在我必须为我的ListView. 但如果切换按钮可见,上下文菜单将不会显示。onListItemClick也不行。为什么?
ListView
TextView
ToogleButton
onListItemClick
@ChiragRaval,我找到了解决方案。
android:focusable="false"因为这ToggleButton是我需要的。现在ToggleButtons 和上下文菜单都可以工作了。
android:focusable="false"
ToggleButton