次の図に示すように、Androidの画面上にいくつかの三角形&の四角形を特定の方法で配置しようとしています。すべての図形がクリック可能なので、私はそれらを別々に置いています。Android:RelativeLayout with xml
私は(私が試した他のレイアウトを、彼らは働いていない)RelativeLayoutを使用。続いて、同じのためのXMLコードです:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/LeftTopTriangle"
android:src="@drawable/a_triangle_towards_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="true"
android:layout_alignTop="true"
android:clickable="true" />
<ImageView
android:id="@+id/TopLeftTriangle"
android:src="@drawable/a_triangle_towards_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="true"
android:layout_alignTop="true"
android:clickable="true" />
<ImageView
android:id="@+id/LeftBottomTriangle"
android:src="@drawable/a_triangle_towards_right"
android:layout_below="@id/LeftTopTriangle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true" />
ここ
私は左上隅と左下隅の1にだけ3の三角形、2をしようとしています。今は何でも、私は試行錯誤して、どうにかして三角形が決して現れない。 私は次のようになります: どのようにそれを達成するためのアイデアを持っていますか? は[PS:layout_alignLeft =「true」を アンドロイド:不思議なxmlファイルで、私もImageViews アンドロイドの両方から次の行を削除し、同じ数字を取得していますlayout_alignTop =「真」]