この画像は、作成する必要があるものを示しています。
これは私のxmlコードです:
<?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:background="@drawable/bg" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
/>
</LinearLayout>
<!-- Now the block that has to be flexible -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="15dp"
android:gravity="center" >
<ImageView
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true" >
</ImageView>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</RelativeLayout>
<!-- -------------------------------- -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton
android:layout_width="70dp"
android:layout_height="61dp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
>
</ImageButton>
<ImageButton
android:scaleType="fitCenter"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" >
</ImageButton>
<ImageButton
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true" >
</ImageButton>
</RelativeLayout>
</LinearLayout>
ストレッチする必要があるブロックは、ImageView と TextView に含まれています。だから私の質問は - この中央のブロックを柔軟にする方法ですが、他の2つのブロックを上部と下部に保持して、画面の高さにとどまるにはどうすればよいですか? 真ん中のブロックが伸びます。