I tried all day to get the minHeight attribute.
I want a linearMe layout:
- Stretch from the bottom of the screen to the bottom of the list when the ListView has just a few items.
- I need to be able to fill out a linearMe layout with an image, for example.
As the ListView linearMe , I want the linearMe layout:
- Have a fixed height (at the bottom of the screen) and ListView to allow scrolling.
My problem is that the linearMe layout linearMe smaller and smaller because there are more elements in the ListView element. And when there is enough element in the listView element to fill the screen, the linearMe layout simply disappeared. It seems that minHeight useless in this case.
<LinearLayout android:layout_width="match_parent" android:orientation="vertical" android:layout_height="match_parent" > <ListView android:id="@+id/list" android:layout_width="match_parent" android:layout_height="wrap_content" /> <LinearLayout android:id="@+id/linearMe" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:background="#FF0000" android:minHeight="200dp" /> </LinearLayout>


I hope you can help me! :)
java android xml layout
Timothรฉe jeannin
source share