In my android app, I want to display an ImageView over anoher ImageView. In the design tab, I get what I want, But when I run the app, the second ImageVIew disappear, Here's my code, , I add elevation attribute but I don't get what I want as result.
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/mainImageProduct"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_marginTop="@dimen/spacing_large"
android:visibility="visible"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/image1" />
<ImageView
android:id="@+id/plusOne"
android:layout_width="50dp"
android:layout_height="50dp"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="@+id/mainImageProduct"
app:layout_constraintEnd_toEndOf="@+id/mainImageProduct"
app:layout_constraintStart_toEndOf="@+id/mainImageProduct"
app:layout_constraintTop_toTopOf="@+id/mainImageProduct"
tools:src="@drawable/plus_in_white_circle" />
</androidx.constraintlayout.widget.ConstraintLayout>