私はそれはむしろ単純な質問だと思うが、私はそれが欲しい方法ではない。 私は3つの領域を持つAndroidで線形レイアウトをしたいですか?Androidリニアレイアウトsteching
トップ領域の高さは、fill_parentでなければなりません。 2番目のものは、最初のものよりも、使用可能なすべての部屋、fill_parentの幅を使用する必要があります。 2番目の下の3番目のものは、固定高さfill_parentの幅を持つ必要があります。ここで
は、私が得たものである:
<?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>
問題があり、中央のIST大きすぎるでのMapView、それはtopbarを押し出すように。
私はあなたが私を助けることを願っています。トリックをしたものだセバスチャン
トップレベルのコンテナをRelativeLayoutにする方が良い方法でしょうか。 – EboMike
'layout_weight'設定を試しましたか? –
私はそれがシンプルだと言った:topのためのlayout_weight = 0とmapviewのための= 1はそれをした。 – Maffo