From f10ac133506fed1151c5ff4eb69b5f85c6510619 Mon Sep 17 00:00:00 2001
From: Torsten Grote <t@grobox.de>
Date: Tue, 22 Nov 2016 09:59:42 -0200
Subject: [PATCH] Make navigation drawer scrollable

---
 .../res/layout/navigation_header.xml          |  2 +-
 briar-android/res/layout/navigation_menu.xml  | 38 ++++++++++++-------
 2 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/briar-android/res/layout/navigation_header.xml b/briar-android/res/layout/navigation_header.xml
index ff120e9dd0..9ac50e3662 100644
--- a/briar-android/res/layout/navigation_header.xml
+++ b/briar-android/res/layout/navigation_header.xml
@@ -3,7 +3,7 @@
 	xmlns:android="http://schemas.android.com/apk/res/android"
 	xmlns:tools="http://schemas.android.com/tools"
 	android:layout_width="match_parent"
-	android:layout_height="100dp"
+	android:layout_height="85dp"
 	android:contentDescription="@string/app_name"
 	android:scaleType="fitStart"
 	android:src="@drawable/navigation_drawer_header"
diff --git a/briar-android/res/layout/navigation_menu.xml b/briar-android/res/layout/navigation_menu.xml
index bb66524680..2c2f8f9b8f 100644
--- a/briar-android/res/layout/navigation_menu.xml
+++ b/briar-android/res/layout/navigation_menu.xml
@@ -1,28 +1,38 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<ScrollView
 	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_width="wrap_content"
 	android:layout_height="match_parent"
 	android:background="@color/menu_background"
+	android:fillViewport="true"
 	android:orientation="vertical">
 
-	<android.support.design.widget.NavigationView
-		android:id="@+id/navigation"
+	<LinearLayout
 		android:layout_width="wrap_content"
-		android:layout_height="match_parent"
-		android:layout_gravity="start"
-		app:headerLayout="@layout/navigation_header"
-		app:menu="@menu/navigation_drawer">
+		android:layout_height="wrap_content"
+		android:orientation="vertical">
+
+		<android.support.design.widget.NavigationView
+			android:id="@+id/navigation"
+			android:layout_width="wrap_content"
+			android:layout_height="wrap_content"
+			android:background="@color/menu_background"
+			app:elevation="0dp"
+			app:headerLayout="@layout/navigation_header"
+			app:menu="@menu/navigation_drawer"/>
+
+		<View
+			android:layout_width="match_parent"
+			android:layout_height="0dp"
+			android:layout_weight="1"/>
 
 		<include
 			layout="@layout/transports_list"
-			android:layout_width="wrap_content"
+			android:layout_width="match_parent"
 			android:layout_height="wrap_content"
-			android:layout_gravity="bottom"
-			tools:visibility="gone"/>
+			android:layout_gravity="bottom"/>
 
-	</android.support.design.widget.NavigationView>
+	</LinearLayout>
 
-</LinearLayout>
\ No newline at end of file
+</ScrollView>
-- 
GitLab