how to set a divider under item in opened group?
i have 4 groups, and a lot of items in the groups, i need to set a bottom divider to all items.
Im trying to write android:divider="orange"
and android:dividerHeight="2dp
to code, but doesnt work.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
tools:context=".MainActivity"
>
<TextView
android:id="@+id/Header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="gray"
android:dividerHeight="20dp"
android:fontFamily="@font/sourcesanspro_bold"
android:padding="10dp"
android:text="keyconfig"
android:textAlignment="viewStart"
android:textColor="gray"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ExpandableListView
android:id="@+id/lvExp"
android:layout_width="match_parent"
android:divider="orange"
android:dividerHeight="2dp"
android:layout_height="match_parent"
android:layout_below="@+id/Header"
android:layout_alignParentBottom="false" >
</ExpandableListView>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="55dip"
android:orientation="vertical"
android:divider="orange"
android:dividerHeight="2dp"
android:background="#d2d4d5 ">
<TextView
android:id="@+id/lblListItem"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="18dp"
android:textColor="gray"
android:background="#d2d4d5 "
android:divider="orange"
android:dividerHeight="2dp"
android:layout_margin="9dp">
</TextView>
</LinearLayout>
question from:
https://stackoverflow.com/questions/65679958/divider-between-items-in-expandablelistview-when-its-opened 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…