Change style of drawer navigation
Change-Id: I8e8856a4fbac712e52fd5d28a5d520b90132226c
diff --git a/app/src/main/res/drawable-hdpi/ic_faces.png b/app/src/main/res/drawable-hdpi/ic_faces.png
new file mode 100755
index 0000000..4115013
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_faces.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/ic_ping.png b/app/src/main/res/drawable-hdpi/ic_ping.png
new file mode 100755
index 0000000..4604839
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_ping.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/ic_route.png b/app/src/main/res/drawable-hdpi/ic_route.png
new file mode 100755
index 0000000..64223fe
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_route.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/ic_status.png b/app/src/main/res/drawable-hdpi/ic_status.png
new file mode 100755
index 0000000..5ebbdb2
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_status.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/ic_strategy.png b/app/src/main/res/drawable-hdpi/ic_strategy.png
new file mode 100755
index 0000000..e0c6423
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_strategy.png
Binary files differ
diff --git a/app/src/main/res/drawable-hdpi/ic_wifidirect.png b/app/src/main/res/drawable-hdpi/ic_wifidirect.png
new file mode 100755
index 0000000..d0e59fc
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_wifidirect.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_faces.png b/app/src/main/res/drawable-mdpi/ic_faces.png
new file mode 100755
index 0000000..df9e712
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_faces.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_ping.png b/app/src/main/res/drawable-mdpi/ic_ping.png
new file mode 100755
index 0000000..85e83c5
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_ping.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_route.png b/app/src/main/res/drawable-mdpi/ic_route.png
new file mode 100755
index 0000000..09ff8d8
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_route.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_status.png b/app/src/main/res/drawable-mdpi/ic_status.png
new file mode 100755
index 0000000..b6b346f
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_status.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_strategy.png b/app/src/main/res/drawable-mdpi/ic_strategy.png
new file mode 100755
index 0000000..703ddeb
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_strategy.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_wifidirect.png b/app/src/main/res/drawable-mdpi/ic_wifidirect.png
new file mode 100755
index 0000000..2cdef27
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_wifidirect.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_faces.png b/app/src/main/res/drawable-xhdpi/ic_faces.png
new file mode 100755
index 0000000..2176e5f
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_faces.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_pingy.png b/app/src/main/res/drawable-xhdpi/ic_pingy.png
new file mode 100755
index 0000000..ad7a04f
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_pingy.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_route.png b/app/src/main/res/drawable-xhdpi/ic_route.png
new file mode 100755
index 0000000..62a9206
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_route.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_status.png b/app/src/main/res/drawable-xhdpi/ic_status.png
new file mode 100755
index 0000000..9c6ef97
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_status.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_strategy.png b/app/src/main/res/drawable-xhdpi/ic_strategy.png
new file mode 100755
index 0000000..50d3bc4
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_strategy.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_wifidirect.png b/app/src/main/res/drawable-xhdpi/ic_wifidirect.png
new file mode 100755
index 0000000..d28c978
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_wifidirect.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_faces.png b/app/src/main/res/drawable-xxhdpi/ic_faces.png
new file mode 100755
index 0000000..2979280
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_faces.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_ping.png b/app/src/main/res/drawable-xxhdpi/ic_ping.png
new file mode 100755
index 0000000..6be6635
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_ping.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_route.png b/app/src/main/res/drawable-xxhdpi/ic_route.png
new file mode 100755
index 0000000..10f3e52
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_route.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_status.png b/app/src/main/res/drawable-xxhdpi/ic_status.png
new file mode 100755
index 0000000..ca4e163
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_status.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_strategy.png b/app/src/main/res/drawable-xxhdpi/ic_strategy.png
new file mode 100755
index 0000000..97e4672
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_strategy.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_wifidirect.png b/app/src/main/res/drawable-xxhdpi/ic_wifidirect.png
new file mode 100755
index 0000000..8c15d21
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_wifidirect.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_faces.png b/app/src/main/res/drawable-xxxhdpi/ic_faces.png
new file mode 100755
index 0000000..6f3dd19
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_faces.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_pingy.png b/app/src/main/res/drawable-xxxhdpi/ic_pingy.png
new file mode 100755
index 0000000..c0e69e5
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_pingy.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_route.png b/app/src/main/res/drawable-xxxhdpi/ic_route.png
new file mode 100755
index 0000000..1d623d5
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_route.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_status.png b/app/src/main/res/drawable-xxxhdpi/ic_status.png
new file mode 100755
index 0000000..ea4e927
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_status.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_strategy.png b/app/src/main/res/drawable-xxxhdpi/ic_strategy.png
new file mode 100755
index 0000000..13f12e8
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_strategy.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_wifidirect.png b/app/src/main/res/drawable-xxxhdpi/ic_wifidirect.png
new file mode 100755
index 0000000..f289e9d
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_wifidirect.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ndn_logo.png b/app/src/main/res/drawable-xxxhdpi/ndn_logo.png
new file mode 100644
index 0000000..5a7c14a
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ndn_logo.png
Binary files differ
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 037aa3f..fe3c704 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -2,6 +2,7 @@
<androidx.drawerlayout.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -14,13 +15,13 @@
android:layout_height="match_parent"
/>
- <!-- DrawerFragment for user navigation -->
- <FrameLayout
+ <com.google.android.material.navigation.NavigationView
android:id="@+id/navigation_drawer"
- android:layout_width="@dimen/drawer_width"
+ android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
- tools:layout="@layout/activity_main_drawer_listview"
+ app:headerLayout="@layout/drawer_header"
+ app:menu="@menu/drawer_menu"
/>
</androidx.drawerlayout.widget.DrawerLayout>
diff --git a/app/src/main/res/layout/drawer_header.xml b/app/src/main/res/layout/drawer_header.xml
new file mode 100644
index 0000000..c36facc
--- /dev/null
+++ b/app/src/main/res/layout/drawer_header.xml
@@ -0,0 +1,14 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical" android:layout_width="match_parent"
+ android:padding="10dp"
+ android:gravity="center"
+ android:layout_height="80dp"
+ android:layout_gravity="center">
+
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:src="@drawable/ndn_logo"
+ android:layout_gravity="center" />
+
+</LinearLayout>
diff --git a/app/src/main/res/layout/list_item_drawer_item.xml b/app/src/main/res/layout/list_item_drawer_item.xml
index 08a598b..c14d385 100644
--- a/app/src/main/res/layout/list_item_drawer_item.xml
+++ b/app/src/main/res/layout/list_item_drawer_item.xml
@@ -4,8 +4,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/drawer_item_background_activated"
- android:paddingLeft="@dimen/default_padding_left"
- android:paddingRight="@dimen/default_padding_right"
+ android:paddingStart="@dimen/default_padding_left"
+ android:paddingEnd="@dimen/default_padding_right"
>
<ImageView
diff --git a/app/src/main/res/menu/drawer_menu.xml b/app/src/main/res/menu/drawer_menu.xml
new file mode 100644
index 0000000..7499683
--- /dev/null
+++ b/app/src/main/res/menu/drawer_menu.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+ <group android:checkableBehavior="single">
+ <item
+ android:id="@+id/nav_general"
+ android:icon="@drawable/ic_status"
+ android:title="@string/drawer_item_general" />
+ <item
+ android:id="@+id/nav_faces"
+ android:icon="@drawable/ic_faces"
+ android:title="@string/drawer_item_faces" />
+ <item
+ android:id="@+id/nav_routes"
+ android:icon="@drawable/ic_route"
+ android:title="@string/drawer_item_routes" />
+ <item
+ android:id="@+id/nav_ping"
+ android:icon="@drawable/ic_ping"
+ android:title="@string/drawer_item_ping" />
+ <item
+ android:id="@+id/nav_wifidirect"
+ android:icon="@drawable/ic_wifidirect"
+ android:title="@string/drawer_item_wifidirect" />
+ </group>
+</menu>
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index f851cec..ca9896c 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -1,7 +1,7 @@
<resources>
<!-- Base application theme. -->
- <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>