新しい Android アプリケーションを開発しています。アプリケーションで以下のスクリーンショットをデザインする必要があります。私はEclipse IDEを使用しています。
以下のコードを使用して、上記のスクリーンショットを作成しました。しかし、異なるスクリーン プレビュー (4.7 インチ WXGA、4.0 インチ WXGA など) を選択するたびに、下のスクリー ショットで矢印でマークされている内側の画像がずれています。以下は一例であるスクリーンショットです。レイアウト内のすべての画像はアイコン (例: ホーム、共有) です。
<?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:background="@drawable/bar"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.9" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginTop="240dp"
android:layout_weight="1.00"
android:src="@drawable/rec_button_stop"
android:visibility="gone" />
</LinearLayout>
<LinearLayout android:id="@+id/linearLayout3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1" >
<ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="40dip" android:layout_marginTop="90dip"/>
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="40dip"
android:layout_marginTop="90dip"
android:src="@drawable/home" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1.00"
android:src="@drawable/rec_button_stop" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.1" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="30dp"
android:layout_height="fill_parent"
android:layout_marginLeft="10dip"
android:src="@drawable/share" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
そのため、異なるサイズの画面プレビューを変更するたびに、より小さな画像 (矢印でマークされたアイコン) を同じ位置 (直線) に固定する必要があります。
いくつかのコードスニペットまたはいくつかのリンクを使用して、誰かが私を案内してくれますか?