テーブルレイアウト/スクロールビューの大きさを制限して、その後のビューが非表示にならないようにする方法はありますか?
たとえば、最初の TextView の下に次の XML があり、ボタンはコンテンツをラップするため、特定のスペースを占有します。これで、スクロール/ビュー テーブルに行が動的に追加されました (大きくなったり、行が 0 になったりする可能性があります)。常に最後の線形レイアウトを表示する必要があります。したがって、理想的には、linearlayout が画面の 10% を占め、残ったもの (最初の Textview とボタン スペースを割り当てた後) が tablelayout/scrollview に割り当てられるようにします。
それを行う方法はありますか?テーブルが空の場合、線形レイアウトは押し上げられ、画面の下部にとどまらないはずです。ウェイトを使用してみましたが、得られていないようです
<TextView ..../>
<Button ..../>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="0dp"
android:shrinkColumns="*"
android:stretchColumns="*" >
</ScrollView>
<LinearLayout
android:layout_marginTop="10dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
... />
<TextView
... />
</LinearLayout>