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.
我的布局中有一个按钮和一个列表视图。列表项有一个选择器。当应用程序启动时,按钮被聚焦并且选择器位于第一个项目上。我想要的是当按钮聚焦时,选择器不应该在任何项目上。当我专注于列表视图项目时,只有选择器应该出现在所选项目上。有什么帮助吗???
将此添加到代表您的列表视图行项目的 xml 的最外层布局。
android:descendantFocusability="blocksDescendants"
我够清楚吗?