Android listview divider color

By default, Android provides simple divider between every row of a ListView. However, it is possible to customize the divider. You can apply your own custom shape, height, and color to the divider. In this Android tip, I am going to show how to achieve the goal.
Let’s add a ListView to the activity_main.xml file. There are two attributes of the ListView that make the divider work: android:divider and android: dividerHeight. The value of the divider attribute will be a custom drawable that defines the shape and color of the divider. You specify the height of the divider using android:dividerHeight attribute.

Now you create a custom drawable xml file. In the file, you specify the shape using
<shape> tag and android:shape attribute. You use <solid> tag to
define the color and <corners> tag to set color and corners radius of
the shape.

This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.