次のレイアウトを作成しようとしています。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</TextView>
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</TextView>
<SeekBar
android:id="@+id/seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</TextView>
</LinearLayout>
親レイアウトの 80% を textView1 と textView2 に割り当て、SeekBar を可能な限りラップし、残りの空き領域を textView3 に割り当てたいと考えています。
私はしようとしました:
- layout_weight 属性 (それぞれ - 4、4、1、1) を使用しますが、最後のビューは SeekBar と重なっています
- textView1 と textView2 でのみ layout-weight を使用し、SeekBar の高さを「wrap_content」に設定し、最後のビューに「match_parent」を設定します
そして今、私にはもうアイデアがありません。そんなお悩みはありませんか?