I have a question.
Why android:elevation
doesn't show shadows? I am making shadows first time
Only used in ImageButton
it's working (when I use with android:background it isn't working)
This is my code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:text="TestBTT"
android:layout_width="295dp"
android:layout_height="41dp"
android:padding="10dp"
android:elevation="30dp"
android:outlineProvider="bounds"
android:background="@drawable/przycisk"
android:id="@+id/button2" android:layout_marginTop="60dp"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="72dp"/>
<ImageButton
android:layout_width="247dp"
android:layout_height="61dp"
android:id="@+id/imageButton" android:layout_marginTop="188dp"
android:elevation="20dp"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
android:layout_marginStart="72dp" android:cropToPadding="true" android:adjustViewBounds="true"/>
<TextView
android:text="TextView"
android:elevation="40dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView" android:textSize="24sp"
android:layout_marginTop="360dp" app:layout_constraintTop_toTopOf="parent"
android:layout_marginStart="196dp"
app:layout_constraintStart_toStartOf="parent"/>
What to do to make the shadows appear under the button? And what to do to show up under the button where is android: background?