【问题标题】:Android expandable listview child dividerAndroid 可扩展列表视图子分隔符
【发布时间】:2016-02-03 04:01:42
【问题描述】:

我有一个带有子视图的可扩展列表视图,当我单击组视图时,它会展开并显示子视图,我必须隐藏父子视图之间的分隔线,仅用于展开的组也使其在折叠时可见,我使用默认分隔符,我该怎么做?

【问题讨论】:

标签: android expandablelistview


【解决方案1】:

这是完美的解决方案。

要隐藏子分隔符,请将其颜色设置为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

【讨论】:

    猜你喜欢
    • 2012-10-31
    • 1970-01-01
    • 2013-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多