0

2つのビューがあります。1つはスクロールビューで、もう1つはLinearLayoutです。LinearLayoutを固定サイズにしたいのですが、約80dpです。このレイアウトを常に画面の右側に配置したいと思います。スクロールビューに使用させたい残りのスペース。これが私のコードのようです。

     <LinearLayout
    android:id="@+id/widget4327"
    android:layout_below="@+id/line"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#F4F5DC">


<ScrollView 
    android:id="@+id/ScrollView01"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="left"
    android:layout_below="@+id/line">

</ScrollView>

<LinearLayout
    android:id="@+id/linearL2"
    android:background="#EEEFE0"
    android:layout_gravity="right"
    android:layout_height="fill_parent"
    android:layout_width="80dp"
    android:orientation="vertical"
    android:gravity="left"
    android:layout_toRightOf="@id/ScrollView01">

</LinearLayout>

</LinearLayout>

重力で対応できると思いましたが、うまくいかないようです。何か案は?

4

1 に答える 1

0

を使用する場合は、をtrueにRelativeLayout設定できますalignToParentLeft

于 2011-02-27T02:47:28.687 に答える