Ian Vink
Ian Vink

Reputation: 68810

Android: Spacer between 2 Listviews

How do I add a 20px space between two listviews:

    <ListView
        android:minWidth="25px"
        android:minHeight="25px"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/listStations" />
 SPACER???
    <ListView
        android:minWidth="25px"
        android:minHeight="25px"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/listSocial" />

Upvotes: 2

Views: 1084

Answers (2)

swathi
swathi

Reputation: 673

For the first listview you can add

 android:layout_marginBottom="20dp"

Upvotes: 1

K-ballo
K-ballo

Reputation: 81409

It would suffice to set paddingTop or paddingBottom to 20px on one of the ListViews. Alternatively, you can create an empty view (for instance a TextView with no text, or as mentioned by @AljoshaBre just a View), and set its layout_height to 20px.

Upvotes: 0

Related Questions