问题描述
提供包含的不仅仅是一个TextView多组视图时,是否有可能preserve ExpandableListView的默认列表项preSS行为。我指的行为是其中项目是pressed改变背景颜色为黄色。
Is it possible to preserve ExpandableListView's default list item press behavior when supplying a group view that contains more than just a TextView. The behavior I'm referring to is where the item being pressed changes background color to yellow.
我每次提供包含例如一组视图一个TextView和一个Button,我失去的行为。
Every time I supply a group view that contains e.g. a TextView and a Button, I lose the behavior.
谢谢!
推荐答案
另一种选择是设置你的ViewGroup根阻拦重点子视图。
Another option is setting your root ViewGroup to block focus for child views.
例如:<的LinearLayout
...
机器人:descendantFocusability =blocksDescendants/>
这篇关于如何能提供包含的不仅仅是一个TextView多组视图时ExpandableListView的默认列表项preSS行为是preserved?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!