]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/layout/drawer.xml
major refactor, make account summary and transaction list fragments, part of the...
[mobile-ledger.git] / app / src / main / res / layout / drawer.xml
index b8f069ff2a8493f8bdb7fe6fac3f4d59299d44fb..e2b35cdf221cce725c7e837e44d22be8286efa45 100644 (file)
@@ -1,4 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright © 2018 Damyan Ivanov.
+  ~ This file is part of Mobile-Ledger.
+  ~ Mobile-Ledger 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.
+  ~
+  ~ Mobile-Ledger 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 Mobile-Ledger. If not, see <https://www.gnu.org/licenses/>.
+  -->
+
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_alignParentStart="true"
-        android:layout_alignParentTop="true">
+        android:layout_alignParentTop="true"
+        android:background="@color/drawer_background">
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:orientation="vertical">
 
-            <LinearLayout
+            <include
+                layout="@layout/nav_header_latest_transactions"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:background="@color/colorPrimary"
-                android:orientation="vertical">
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:orientation="vertical"
-                    android:paddingLeft="16dp">
-
-                    <TextView
-                        android:id="@+id/textView6"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:paddingTop="32dp"
-                        android:text="@string/app_name"
-                        android:textColor="@android:color/white" />
-
-                    <TextView
-                        android:id="@+id/drawer_version_text"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:text="v1.1.1"
-                        android:textColor="@android:color/white" />
-                </LinearLayout>
-
-            </LinearLayout>
+                android:layout_height="wrap_content" />
 
             <LinearLayout
+                android:id="@+id/nav_actions"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:orientation="vertical"
-                android:paddingLeft="16dp">
+                android:orientation="vertical">
 
                 <TextView
-                    android:id="@+id/textView4"
+                    android:id="@+id/nav_account_summary"
                     style="@style/nav_button"
                     android:drawableStart="@drawable/ic_home_black_24dp"
+                    android:onClick="onAccountSummaryClicked"
+                    android:text="@string/account_summary_title" />
+
+                <TextView
+                    android:id="@+id/nav_latest_transactions"
+                    style="@style/nav_button"
+                    android:drawableStart="@drawable/ic_event_note_black_24dp"
+                    android:onClick="onLatestTransactionsClicked"
                     android:text="@string/nav_latest_transactions_title" />
 
                 <TextView
@@ -61,6 +62,7 @@
                     style="@style/nav_button"
                     android:drawableStart="@drawable/ic_assignment_black_24dp"
                     android:text="@string/nav_reports_title" />
+
             </LinearLayout>
 
         </LinearLayout>
         android:layout_alignParentEnd="true"
         android:layout_alignParentBottom="true"
         android:layout_marginEnd="0dp"
+        android:divider="@drawable/list_divider"
+        android:elevation="2dp"
         android:orientation="vertical"
-        android:paddingLeft="16dp">
+        android:paddingStart="16dp"
+        android:paddingEnd="16dp"
+        android:showDividers="beginning">
 
         <TextView
             android:id="@+id/textView2"
             style="@style/nav_button"
             android:layout_weight="1"
             android:drawableStart="@drawable/ic_settings_black_24dp"
+            android:onClick="nav_settings_clicked"
             android:text="@string/action_settings" />
 
         <TextView
-            android:id="@+id/textView3"
+            android:id="@+id/nav_exit"
             style="@style/nav_button"
             android:layout_weight="1"
             android:drawableStart="@drawable/ic_exit_to_app_black_24dp"
+            android:onClick="nav_exit_clicked"
             android:text="@string/nav_exit_title" />
 
     </LinearLayout>