Remove ListView separator(in the xml layout file)

Caroline picture Caroline · Aug 16, 2011 · Viewed 71.1k times · Source

How can I remove the rows separator in a ListView(if possible within the XML layout file where it's described)?

Answer

Priebe picture Priebe · May 6, 2012

Set the dividerHeight to zero and divider to null like this in xml:

android:dividerHeight="0dp"
android:divider="@null"

Or in java:

getListView().setDividerHeight(0);
getListView().setDivider(null);