0

I have an expandable listview with child view, when ever i click on group view it will expand and display child view, i have to hide divider between parent and child only for the expanded group also make it visible when it collapse, am using default divider, how can i do this.?

Vishwanath.M
  • 6,235
  • 11
  • 42
  • 56

1 Answers1

1

Here is perfect solution.

to hide the child divider set it color to transparent #00000000

define transparent in your color.xml file

<color name="transparent">#00000000</color>

and then set the child divider

listView.setChildDivider(getResources().getDrawable(R.color.transparent))

or in the layout xml file

<ExpandableListView 
android:layout_width="fill_parent"
android:layout_height="fill_parent" 
android:childDivider="#00000000"/>

here is output :

enter image description here

for more detail visit here.

Android: Hide child dividers in ExpandableListView

Community
  • 1
  • 1
Harshad
  • 1,344
  • 1
  • 10
  • 25