Reputation: 5058
On Android, how can the Line which appears in a listview
at the bottom of Lists be removed?
Upvotes: 46
Views: 39075
Reputation: 1
You can set this property in your Style:
<ListView.Resources>
<Style TargetType="ListView">
<Setter Property="SeparatorVisibility" Value="None"/>
</Style>
</ListView.Resources>
Upvotes: 0
Reputation: 11114
Great answers. I decided to use this in ListView for better readability than colour "#00xxxxxx". transparent is a system colour available by android platform.
android:divider="@android:color/transparent"
Upvotes: 6
Reputation: 3035
Please write this one after defining your listview:
Yourlistview.setDivider(null); // Will remove the divider
Upvotes: 2
Reputation: 38439
see this link to more info:-
getListView().setDivider(null);
getListView().setDividerHeight(0);
Or, if you want to do it in XML:
android:divider="@null"
android:dividerHeight="0dp"
Upvotes: 20
Reputation: 10462
do this
myListview.setDivider(null);
This should help you.
Upvotes: 86
Reputation: 2662
Another option would be to set a transparent color for the android:divider attribute:
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="#00000000"
/>
Upvotes: 56