Issue :Give elevation for an image in my layout.
Layout Structure: Constraint Layout-> Card View
The image to be elevated in half on constraint layout and half on card view.
I could not use the shadow approach since my image is not completely on a single view.
Is there a way this is possible on pre-lollipop devices?
Layout file:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
android:background="#246389"
android:orientation="vertical">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/imageView3"
android:layout_width="264dp"
android:layout_height="152dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:elevation="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:srcCompat="@drawable/login_car" />
<android.support.v7.widget.CardView
android:id="@+id/cardView"
android:layout_width="270dp"
android:layout_height="450dp"
android:layout_margin="20dp"
app:cardBackgroundColor="#00AFEF"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent"
app:layout_constraintVertical_bias="0.5">
</android.support.v7.widget.CardView>
</android.support.constraint.ConstraintLayout>