]> git.ktnx.net Git - mobile-ledger.git/commitdiff
leave nav bar header at primary color; accent is too strong
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 20 Feb 2019 20:05:15 +0000 (22:05 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 20 Feb 2019 20:05:52 +0000 (22:05 +0200)
a tiny divider at the top sets it apart from the action bar

app/src/main/res/drawable-anydpi-v21/side_nav_bar.xml
app/src/main/res/drawable/list_divider_inside_out.xml [new file with mode: 0644]
app/src/main/res/layout/activity_main.xml

index c141e3121de162fa0fd310955608874d52a44962..ddb10ac3b8a1d0b85e17c4e5d345550678c98720 100644 (file)
@@ -18,6 +18,6 @@
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle">
     <solid
-        android:color="?colorAccent"
+        android:color="?colorPrimary"
         />
 </shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/list_divider_inside_out.xml b/app/src/main/res/drawable/list_divider_inside_out.xml
new file mode 100644 (file)
index 0000000..391a7d4
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright © 2018 Damyan Ivanov.
+  ~ This file is part of MoLe.
+  ~ MoLe is free software: you can distribute it and/or modify it
+  ~ under the term of the GNU General Public License as published by
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ (at your opinion), any later version.
+  ~
+  ~ MoLe is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  ~ GNU General Public License terms for details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
+  -->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <gradient
+        android:type="linear"
+        android:endColor="?colorPrimary"
+        android:centerColor="?colorPrimaryTransparent"
+        android:startColor="?colorPrimary" />
+    <size android:height="1dp" />
+</shape>
\ No newline at end of file
index 8a380b0e0ac0356ffd1b638268f74697cc8c3a78..bd9f2f849c2f7f32def49e3b0f303c4189d7738a 100644 (file)
                         android:id="@+id/nav_upper"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
+                        android:divider="@drawable/list_divider_inside_out"
                         android:orientation="vertical"
+                        android:showDividers="beginning"
                         app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
                         app:layout_constraintTop_toBottomOf="@+id/nav_header">