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.
我有一个覆盖的自定义视图LinearLayout,我已设置isFocusable为该true视图现在可以获得焦点,但问题是当单击布局中的任何视图时,布局失去焦点。我怎样才能防止这种情况发生?
LinearLayout
isFocusable
true
编辑
我无法将这些视图设置为不可聚焦,因为它们不再起作用。
使用ViewGroup.setDescendantFocusability。