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.?
Asked
Active
Viewed 1,320 times
0
-
Have you tried the solution found at http://stackoverflow.com/a/3262206/1158886? – Troy Perales Feb 03 '16 at 04:23
-
@Vishwanath look the answer below. – Harshad Feb 03 '16 at 04:44
1 Answers
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 :
for more detail visit here.