From 0b595b94da508fe3e58c7467ff6d158b3679feaf Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Fri, 22 Oct 2021 10:07:41 +0200 Subject: [PATCH] - specify elevation in account header as dimension, for easier adjustment - FIX https://github.com/mikepenz/MaterialDrawer/issues/2751 --- .../layout/material_drawer_compact_header.xml | 4 ++-- .../main/res/layout/material_drawer_header.xml | 16 ++++++++-------- materialdrawer/src/main/res/values/dimens.xml | 3 +++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/materialdrawer/src/main/res/layout/material_drawer_compact_header.xml b/materialdrawer/src/main/res/layout/material_drawer_compact_header.xml index 252abb8e3..dcbbb0fb3 100644 --- a/materialdrawer/src/main/res/layout/material_drawer_compact_header.xml +++ b/materialdrawer/src/main/res/layout/material_drawer_compact_header.xml @@ -71,7 +71,7 @@ android:layout_marginStart="@dimen/material_drawer_vertical_padding" android:layout_marginLeft="@dimen/material_drawer_vertical_padding" android:clickable="true" - android:elevation="2dp" + android:elevation="@dimen/material_drawer_account_header_profile_elevation" android:focusable="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -81,7 +81,7 @@ android:id="@+id/material_drawer_account_header_current_badge" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:elevation="4dp" + android:elevation="@dimen/material_drawer_account_header_profile_badge_elevation" android:fontFamily="sans-serif" android:gravity="center" android:lines="1" diff --git a/materialdrawer/src/main/res/layout/material_drawer_header.xml b/materialdrawer/src/main/res/layout/material_drawer_header.xml index 892c511b7..3b9d6fa49 100644 --- a/materialdrawer/src/main/res/layout/material_drawer_header.xml +++ b/materialdrawer/src/main/res/layout/material_drawer_header.xml @@ -32,7 +32,7 @@ android:layout_marginLeft="@dimen/material_drawer_vertical_padding" android:layout_marginTop="@dimen/material_drawer_account_header_horizontal_top" android:clickable="true" - android:elevation="2dp" + android:elevation="@dimen/material_drawer_account_header_profile_elevation" android:focusable="true" android:scaleType="fitCenter" app:layout_constraintStart_toStartOf="parent" @@ -42,7 +42,7 @@ android:id="@+id/material_drawer_account_header_current_badge" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:elevation="4dp" + android:elevation="@dimen/material_drawer_account_header_profile_badge_elevation" android:fontFamily="sans-serif" android:gravity="center" android:lines="1" @@ -64,7 +64,7 @@ android:layout_marginEnd="@dimen/material_drawer_vertical_padding" android:layout_marginRight="@dimen/material_drawer_vertical_padding" android:clickable="true" - android:elevation="2dp" + android:elevation="@dimen/material_drawer_account_header_profile_small_elevation" android:focusable="true" android:scaleType="fitCenter" android:visibility="visible" @@ -75,7 +75,7 @@ android:id="@+id/material_drawer_account_header_small_first_badge" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:elevation="4dp" + android:elevation="@dimen/material_drawer_account_header_profile_badge_elevation" android:fontFamily="sans-serif" android:gravity="center" android:lines="1" @@ -97,7 +97,7 @@ android:layout_marginEnd="@dimen/material_drawer_vertical_padding" android:layout_marginRight="@dimen/material_drawer_vertical_padding" android:clickable="true" - android:elevation="2dp" + android:elevation="@dimen/material_drawer_account_header_profile_small_elevation" android:focusable="true" android:scaleType="fitCenter" android:visibility="visible" @@ -108,7 +108,7 @@ android:id="@+id/material_drawer_account_header_small_second_badge" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:elevation="4dp" + android:elevation="@dimen/material_drawer_account_header_profile_badge_elevation" android:fontFamily="sans-serif" android:gravity="center" android:lines="1" @@ -130,7 +130,7 @@ android:layout_marginEnd="@dimen/material_drawer_vertical_padding" android:layout_marginRight="@dimen/material_drawer_vertical_padding" android:clickable="true" - android:elevation="2dp" + android:elevation="@dimen/material_drawer_account_header_profile_small_elevation" android:focusable="true" android:scaleType="fitCenter" android:visibility="visible" @@ -141,7 +141,7 @@ android:id="@+id/material_drawer_account_header_small_third_badge" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:elevation="4dp" + android:elevation="@dimen/material_drawer_account_header_profile_badge_elevation" android:fontFamily="sans-serif" android:gravity="center" android:lines="1" diff --git a/materialdrawer/src/main/res/values/dimens.xml b/materialdrawer/src/main/res/values/dimens.xml index dca057161..b29709269 100755 --- a/materialdrawer/src/main/res/values/dimens.xml +++ b/materialdrawer/src/main/res/values/dimens.xml @@ -36,6 +36,9 @@ 1dp 18dp 56dp + 2dp + 2dp + 4dp 8dp