I have the following xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/filters_view_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ededed"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp" >
<ExpandableListView
android:id="@+id/filters_List"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#00000000">
</ExpandableListView>
</LinearLayout>
The LinearLayout has a gray background. I want this background to fill the whole screen (the space between the blue bar and the black bar), so I set the height of the LinearLayout to match_parent, but it keeps wrapping the list that contents, so I get a white gap. Here is how it looks like:
Anybody could give me a hint about how to make this?
Thanks!
EDIT: petrumo and Tanis.7x were almost right. Some parent views wasn't taking all the available space. I fixed it, and now all the parent views are taking all the space. The first view that isn't filling the space is the LinearLayout I posted (with ID filters_view_container
). It has android:layout_height="match_parent"
so I don't understand why is not taking all the space.
I am adding a snapshot of the hierarchy viewer with this LinearLayout selected.