Android 可扩展的列表视图子分隔线
Android expandable listview child divider
我有一个带有子视图的可扩展列表视图,每当我单击组视图时,它都会展开并显示子视图,我必须隐藏父子视图之间的分隔线,以便展开的组在折叠时也能显示,我正在使用默认分隔符,我该怎么做。?
这是完美的解决方案。
要隐藏子分隔线,请将其颜色设置为 transparent #00000000
在您的 color.xml 文件中定义透明
<color name="transparent">#00000000</color>
然后设置子分隔符
listView.setChildDivider(getResources().getDrawable(R.color.transparent))
或在布局xml文件中
<ExpandableListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:childDivider="#00000000"/>
这里是输出:
有关更多详细信息,请访问此处。
Android: Hide child dividers in ExpandableListView
我有一个带有子视图的可扩展列表视图,每当我单击组视图时,它都会展开并显示子视图,我必须隐藏父子视图之间的分隔线,以便展开的组在折叠时也能显示,我正在使用默认分隔符,我该怎么做。?
这是完美的解决方案。
要隐藏子分隔线,请将其颜色设置为 transparent #00000000
在您的 color.xml 文件中定义透明
<color name="transparent">#00000000</color>
然后设置子分隔符
listView.setChildDivider(getResources().getDrawable(R.color.transparent))
或在布局xml文件中
<ExpandableListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:childDivider="#00000000"/>
这里是输出:
有关更多详细信息,请访问此处。
Android: Hide child dividers in ExpandableListView