I'm developing a app that have a Listview
, and the items from list already have a style I don't need the divider.
How do I set as hidden or remove the divider from the ListView
?
I'm developing a app that have a Listview
, and the items from list already have a style I don't need the divider.
How do I set as hidden or remove the divider from the ListView
?
You can try
android:divider="@null"
.There are different ways to achieve this, but I'm not sure which one is the best (I don't even know is there is a best way). I know at least 2 different ways to do this in a ListView:
1. Set divider to null:
1.1. Programmatically
1.2. XML
2. Set divider to transparent and set its height to 0 to avoid adding space between listview elements:
2.1. Programmatically:
2.2. XML
Add
to your LIstview