Top Menu

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Friday 6 February 2015

Remove line in between two listView (or single listView)

There are different ways to achieve this, at least 2 different ways to do this in a ListView:

1. Set divider to null:
1.1. Programmatically
yourListView.setDivider(null);
1.2. XML
android:divider="@null" (this goes inside your ListView element)
2. Set divider to transparent and set its height to 0 to avoid adding space between listview elements:
2.1. Programmatically:
yourListView.setDivider(new ColorDrawable(android.R.color.transparent));
yourListView.setDividerHeight(0);
2.2. XML
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
 
developer.android.com: #ListView 

No comments:

Post a Comment