On Android, how can the Line which appears in a listview
at the bottom of Lists be removed?
How to remove the border in a Listview?
Asked Answered
do this
myListview.setDivider(null);
This should help you.
If you are inside an activity that extends ListActivity (custom adapter), it would be getListView().setDivider(null); –
Mores
@rohitmandiwal can you help answer this question please? #37358515 –
Alinealinna
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"
/>
I like this better; configuring things like dividers should be less obtrusive. –
Tildi
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"
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"
Please write this one after defining your listview:
Yourlistview.setDivider(null); // Will remove the divider
You can set this property in your Style:
<ListView.Resources>
<Style TargetType="ListView">
<Setter Property="SeparatorVisibility" Value="None"/>
</Style>
</ListView.Resources>
© 2022 - 2024 — McMap. All rights reserved.