アプリに1つと1つImageView
のsがあり、以下に示すようなレイアウトが必要です。TextView
Gallery
............................................-.
<ImageView>| <TextView> |<ImageView>|
..............................................
| |
| Gallery |
| |
|............................................|
ImageView
私はテーブルレイアウトを持っていて、テキストの長さが短い場合に画面の右端のが動き続けることを除いて、上記のようにほぼデザインを取得しました。ImageView
テキストのサイズに関係なく、画面の左端と右端の'を固定したい。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<TableRow>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/imageL"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:minHeight="30px"
android:minWidth="30px" />
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/title"
android:paddingLeft="10px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="3"
android:layout_gravity="center"
android:minHeight="30px"
android:minWidth="30px" />
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/imageR"
android:paddingLeft="10px"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:minHeight="30px"
android:minWidth="30px" />
</TableRow>
</TableLayout>
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>