簡単な質問: にプロパティを持つ以下view1に配置したいと思い ます。明らかに、利用可能なスペースがたくさんあっても機能しません。view2layout_centerVertical="true"RelativeLayoutandroid:layout_below="@id/view2"
<ImageView
android:id="@+id/view2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:adjustViewBounds="true"
android:padding="10dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/image1"/>
<ImageView
android:id="@+id/view1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/view2"
android:adjustViewBounds="true"
android:src="@drawable/image2" />
今、私はこれを引き起こす原因を見つけました。私は別の見方をしています:
<View
android:id="@+id/view3"
android:layout_width="10dip"
android:layout_height="10dip"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="#fff" />
このビューにプロパティ(中央のビュー) にandroid:layout_alignParentBottom="true"関連するすべてのものがある場合view2、レイアウトが狂ってしまいます (消える) が、奇妙なview2ことに動かないでください。私がandroid:layout_alignParentBottom="false"すべてに変更すると、通常に戻ります。わかりませんview3、他の見解とは何の関係もありません。私が尊重しないルールはありますか?私を助けてください。どんな答えでも大歓迎です。