相対レイアウトを使用して、画像をドラッグ アンド ドロップする Android プロジェクトを開発しています。
ここでの問題は、Galaxy Grand 電話でテストすると画像が期待どおりの位置に座っていることですが、Galaxy Nexus で同じプロジェクトをテストすると、画像が画面上でずれているように見えます。以下のスクリーン ショットをチェックしてください: 1) 銀河ネクサス
2) 銀河グランド スクリーン ショットと私を助けてください。
ここに私のXMLコードがあります:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#3B5998" >
<Chronometer
android:id="@+id/chronometer"
android:layout_width="0dp"
android:layout_height="0dp"
android:textSize="20sp"
android:textStyle="bold"
android:typeface="sans"
android:visibility="gone" />
<ImageView
android:id="@+id/imagebackgroundofearth"
android:layout_width="100dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="15dp"
android:layout_height="100dp"
android:src="@drawable/imagered" />
<ImageView
android:id="@+id/imageviewunderleft"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="150dp"
android:layout_marginLeft="30dp"
android:src="@drawable/imagered" />
<ImageView
android:id="@+id/imageviewunderright"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="150dp"
android:layout_marginLeft="190dp"
android:src="@drawable/imageorange" />
<ImageView
android:id="@+id/imageviewabove"
android:layout_width="100sp"
android:layout_height="100sp"
android:layout_marginTop="15dp"
android:layout_marginLeft="110dp"
android:src="@drawable/earth" />
<Button
android:id="@+id/reload"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="30dp"
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"
android:text="Reload" />
</RelativeLayout>