下のコードで示すように、重複したいImageViewが2つありますが、大きい方は体系的に小さい方の下に配置されています。両方ともアンドロイドです:layout_alignParentTopが "true"に設定されていれば、重なり合っているが、アンドロイドはそれらを互いに下に置いている。RelativeViewでオーバーラップするImageView
<RelativeLayout android:id="@+id/RelativeLayout1"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:gravity="center_horizontal|center_vertical">
<ImageView android:id="@+id/homeStars" android:src="@drawable/background"
android:layout_height="wrap_content" android:layout_width="fill_parent" android:scaleType="centerInside"
android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_alignParentTop="true"
/>
<ImageView android:id="@+id/homeLogo" android:src="@drawable/logo"
android:layout_height="wrap_content" android:layout_width="220dip"
android:layout_alignParentTop="true" android:layout_centerHorizontal="true"
android:paddingTop="2dip" />
</RelativeLayout>
注1:最初のものを相対的なビューのバックグラウンドとして設定することは望ましくありません。 注2:この相対レイアウトがScrollView内に配置されていると付け加えるべきです。
あなたは今問題が重なっています...?そしてあなたは何をしたいのですか? – Graeme
私はそれらが重なり合ってほしい – AsTeR
もし誰かが後ろにいるなら...どのように重なり合っていないのですか? – Graeme