I'm creating a custom drawer view which has multiple listViews. To show this nicely to the user I want to separate these listViews with a divider.
I've managed to show the dividers between the items, and even get the last one to show a divider, but not just the last item.
I know I can toggle the dividers with
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
But that is not the desired effect (dividers between each listitem). I just need a line underneath the list.
My ListView XML at this point:
<ListView android:id="@+id/list_view_drawer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="false"
android:choiceMode="singleChoice"
android:divider="@color/progress_gray"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:dividerHeight="1dp"
android:background="#fff" />
Is there any way to achieve this effect?
Thanks in advance.
EDIT: I'm aware that I can put a view of 1dp height underneath the list. But I'm looking for an option within the list view. If that's not possible, which it's starting to look like. I'll go with that solution. Bit dirty in my opinion, but it can't be helped.
You could simply add a 1dp high View between your listviews.
</ListView>
<View
android:layout_height="1dp"
android:layout_width="match_parent"
android:background="@android:color/red"
/>