Как сделать так, чтобы TextView
был поверх ImageView
? Делаю так, но TextView
оказывается в конце, а ImageView
по центру. Как сделать, чтобы получилось так как на картинке?
<?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="wrap_content"
android:layout_margin="10dp"
android:background="#FFF">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:src="@drawable/no_image" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#7000"
android:gravity="center"
android:text="Название блюда"
android:textColor="#FFF"
android:textSize="36sp"
android:textStyle="bold" />
</RelativeLayout>