Android Linear Layout steching
Posted
by
Maffo
on Stack Overflow
See other posts from Stack Overflow
or by Maffo
Published on 2011-01-03T07:50:18Z
Indexed on
2011/01/03
7:53 UTC
Read the original article
Hit count: 193
android
Hi,
I think that's a rather simple Question but I don't get it the way I want it to. I Want do do a Linear Layout in Android with 3 areas.
The Top area should have a fixed height, fill_parent width. The second, below the first, should use all the room available, fill_parent width. The third, below the second, should have fixed height, fill_parent width.
Here is what i got:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="bottom"
android:background="#ff63a920">
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="fill_parent"
android:layout_height="32dp"
>
</LinearLayout>
<com.google.android.maps.MapView android:id="@+id/mymapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
/>
<LinearLayout
android:id="@+id/bottombar"
android:layout_width="fill_parent"
android:layout_height="32dp"
>
</LinearLayout>
</LinearLayout>
The Problem is, that the mapview in the middle ist too big, so it pushes out the topbar.
I Hope you can help me.
© Stack Overflow or respective owner