Я разрабатываю макет профиля. Для которого я использую Imageview и RelativeLayout. Я пытаюсь поместить ImageView поверх RelativeLayout. Я использовал и height, и android: scaleType = "centerCrop", но в редакторе дизайна все нормально, но когда я компилирую и запускаю приложение, ImageView всегда остается позади RelativeLayout.
В редакторе дизайна это показывает
![enter image description here](https://i.stack.imgur.com/dYSlP.jpg)
Что то, что я хочу, но в устройстве, это показывает, как это
![enter image description here](https://i.stack.imgur.com/XouTm.png)
Пожалуйста, помогите ..
Ниже находится мой XML-файл
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/layout">
<ImageView
android:id="@+id/header_cover_image"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="#000000"
android:scaleType="centerCrop"
android:src="@drawable/nav_menu_heade" />
<ImageView
android:clickable="true"
android:id="@+id/profile"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_below="@+id/header_cover_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="-130dp"
android:scaleType="fitStart"
android:elevation="8dp"
android:padding="20dp"
android:src="@drawable/passport" />
<RelativeLayout
android:id="@+id/profile_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/header_cover_image"
android:background="#eb0772ca"
android:elevation="2dp"
android:paddingBottom="2dp">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="70dp"
android:text="Sagar Rawal"
android:textColor="#fff"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
android:id="@+id/quote"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/name"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="Don't Cry cuz it's over, Smile cuz it happen"
android:textColor="#ffffff"
android:textSize="18sp" />
<TextView
android:id="@+id/location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/quote"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="Jumla, Nepal"
android:textColor="#ffffff"
android:textSize="16sp" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>