Hide banner of navigation drawer when not enough screen heigth available

This commit is contained in:
Torsten Grote
2020-01-15 09:22:50 -03:00
parent ab9ade9a0b
commit 792892d933
2 changed files with 26 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="85dp"
android:background="@color/briar_primary"
tools:showIn="@layout/navigation_menu">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|start"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginRight="@dimen/margin_medium"
android:layout_marginBottom="@dimen/margin_medium"
android:contentDescription="@string/app_name"
android:src="@drawable/navigation_drawer_header" />
</FrameLayout>

View File

@@ -2,20 +2,12 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="85dp"
android:background="@color/briar_primary"
android:layout_height="0dp"
tools:showIn="@layout/navigation_menu">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|start"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginRight="@dimen/margin_medium"
android:layout_marginBottom="@dimen/margin_medium"
android:contentDescription="@string/app_name"
android:src="@drawable/navigation_drawer_header" />
<!--
This is left intentionally empty for use in screens with a small height.
See the other resource file with the same name for the real header layout.
-->
</FrameLayout>