私は次の構造を持っています:
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="match_parent"
android:layout_height="0dip"
android:background="@drawable/framewhite"
android:orientation="vertical"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:gravity="right"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
>
<TextView
android:id="@+id/txtBestPickTrivia"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/testTrivia"
android:textAppearance="?android:attr/textAppearanceMedium" />
</ScrollView>
<TextView
android:id="@+id/txtEntityName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="10dp"
android:layout_marginRight="20dp"
android:text="Cars (2006)" />
</LinearLayout>
ScrollView の次の行で問題が発生します。
android:layout_height="120dp"
画面の解像度に応じて高さを調整したいのですが、HTC Desire で正常に動作する3.7 インチ WVGA (Nexus One)を使用して設計しましたが、 3.2 HVGAを使用する HTC Explorer を使用してアプリをテストしたところ、動作しませんでした。ScrollView が画面の境界を越えてしまい、TextView、つまり txtEntityName が表示されません。
もう1つ、コントロールを上、下、右、または左にドッキングできる.NETのように、任意のコントロールをドッキングできる方法はありますか?