1
でlayout_centerVertical = "true" の[編集]避けてください:RelativeLayout
考える:私は小さな画面上のテキスト1とテキスト2の間の重複を避けることができますどのように
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/text1"
android:layout_width="match_parent"
android:layout_height="200dip"
android:background="#ff00ff00" />
<TextView
android:id="@+id/text2"
android:layout_width="match_parent"
android:layout_height="200dip"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="#ffff0000" />
</RelativeLayout>
。重要:重複がある場合
ない重複を有することが可能であれば、テキスト2は、画面の垂直方向の中心に正確に表示されるべき
、テキスト2は少し下に移動すべきであるとテキスト1
下に直接表示することが
おかげで、しかし、ここでbutton_containerはない画面の中央に、残りのスペースの真ん中にある:あなたのコードは、変更後に次のようになります。私は画面の真ん中にそれが必要です(十分なスペースがあれば)。 –
あなたは質問全体を変更しましたが、試行された回答はすべてコンテキスト外になりました。別途ご質問ください。 – Akhil