Ich habe einige Probleme beim Hinzufügen von Höhe für Android-Version < 21. Vor kurzem fand ich es einfach, Erhöhung auf Kartenansicht hinzufügen, aber ich konnte das gleiche Ergebnis für andere Ansichten wie Bildansicht nicht erreichen , Werkzeugleiste, Schubladen-Layout, etc. Kann mir jemand dabei helfen ???Wie man Elevation auf Android API hinzufügen <21
Zum Beispiel: Wenn ich die Höhe meines Schubladenlayouts entsprechend dem Materialdesign hinzufügen möchte, was soll ich tun?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@drawable/side_nav_bar"
android:gravity="bottom"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:src="@drawable/ic_person_black_64dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="Android"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="android studio" />
</LinearLayout>
Fügen Sie hier Ihre XML-Datei hinzu –