この小さな問題を克服する方法を見つけようとしています。
以下の左側は、アプリに実装しようとしているビューのサンプルです。右側は、最終的に表示されるビューです。
私の xml モックアップでは、a を使用することにしましたが、トップ ビューとボトム ビューの中央に配置するRelativeLayout
ことができません。TextView
参考までに、私のxmlコードの表現を次に示します。
<RelativeLayout
android:layout_width:"match_parent"
android:layout_height:"wrap_content">
<ImageView
android:id="@+id/BlackImage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_alightParentTop="true"
android:layout_centerHorizontal="true"/>
<ImageView
android:id="@+id/RedImage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_below="@+id/BlackImage"
android:layout_centerHorizontal="true"/>
<TextView
android:id="@+id/TextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/BlackImage"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
私が欠けているもの、または私が望むものを得るために変更する方法はありますか?