Мой файл макета:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
tools:context=".TurnOnLocation">
<LinearLayout
android:id="@+id/requires_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/turn_on_location">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp"
app:cardElevation="10dp"
app:cardPreventCornerOverlap="false">
<TextView
android:id="@+id/info_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:paddingStart="60dp"
android:paddingEnd="60dp"
android:textSize="28sp"
android:text="test"
android:textColor="@color/colorPrimary"
android:textAlignment="center"
android:background="@color/colorPrimaryDark" />
</androidx.cardview.widget.CardView>
</LinearLayout>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/turn_on_location"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/medium_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/turn_on_location"
app:layout_constraintTop_toBottomOf="@id/requires_location"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Я указал app:cardElevation="10dp"
, который, как мне кажется, предназначен для рендеринга тени.Однако никакой тени не появляется.
Есть идеи почему?