How do I change the color of the separation line in the list view of Android? Please teach me.
android android-listview
In the xml file, you can change the color of the divider by giving the value of the desired color to android:divider. android:divider="#FF0000"Write it like this. You can also change the color of the divider and reduce the thickness of the divider with android:dividerHeight.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView
android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:divider="#FFCC00"
android:dividerHeight="4px"/>
</LinearLayout>
© 2024 OneMinuteCode. All rights reserved.