]> git.ktnx.net Git - mobile-ledger-staging.git/blob - app/src/main/res/layout/main_navigation.xml
f634eebcf94f7c11f5bc374f2f235d566d45eb49
[mobile-ledger-staging.git] / app / src / main / res / layout / main_navigation.xml
1 <?xml version="1.0" encoding="utf-8"?><!--
2   ~ Copyright © 2019 Damyan Ivanov.
3   ~ This file is part of MoLe.
4   ~ MoLe is free software: you can distribute it and/or modify it
5   ~ under the term of the GNU General Public License as published by
6   ~ the Free Software Foundation, either version 3 of the License, or
7   ~ (at your opinion), any later version.
8   ~
9   ~ MoLe is distributed in the hope that it will be useful,
10   ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
11   ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   ~ GNU General Public License terms for details.
13   ~
14   ~ You should have received a copy of the GNU General Public License
15   ~ along with MoLe. If not, see <https://www.gnu.org/licenses/>.
16   -->
17
18 <com.google.android.material.navigation.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
19     xmlns:app="http://schemas.android.com/apk/res-auto"
20     xmlns:tools="http://schemas.android.com/tools"
21     android:id="@+id/nav_view"
22     android:layout_width="wrap_content"
23     android:layout_height="match_parent"
24     android:layout_gravity="start"
25     android:fitsSystemWindows="true"
26     android:theme="@style/ThemeOverlay.AppCompat.Light">
27
28
29     <androidx.constraintlayout.widget.ConstraintLayout
30         android:layout_width="match_parent"
31         android:layout_height="match_parent"
32         android:layout_marginBottom="0dp"
33         android:animateLayoutChanges="true"
34         android:orientation="vertical">
35
36         <LinearLayout
37             android:id="@+id/nav_fixed_items"
38             android:layout_width="match_parent"
39             android:layout_height="wrap_content"
40             android:divider="@drawable/list_divider"
41             android:elevation="2dp"
42             android:orientation="vertical"
43             android:showDividers="beginning"
44             android:visibility="gone"
45             app:layout_constraintBottom_toBottomOf="parent">
46
47             <TextView
48                 android:id="@+id/textView2"
49                 style="@style/nav_button"
50                 android:layout_weight="1"
51                 android:drawableStart="@drawable/ic_settings_black_24dp"
52                 android:text="@string/action_settings" />
53
54         </LinearLayout>
55
56         <ScrollView
57             android:layout_width="0dp"
58             android:layout_height="0dp"
59             app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
60             app:layout_constraintEnd_toEndOf="parent"
61             app:layout_constraintLeft_toLeftOf="parent"
62             app:layout_constraintStart_toStartOf="parent"
63             app:layout_constraintTop_toTopOf="parent">
64
65             <LinearLayout
66                 android:id="@+id/nav_upper"
67                 android:layout_width="match_parent"
68                 android:layout_height="wrap_content"
69                 android:animateLayoutChanges="true"
70                 android:orientation="vertical"
71                 android:showDividers="beginning"
72                 app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
73                 app:layout_constraintTop_toBottomOf="@+id/nav_header">
74
75                 <include layout="@layout/nav_header_layout" />
76
77                 <LinearLayout
78                     android:id="@+id/nav_actions"
79                     android:layout_width="match_parent"
80                     android:layout_height="match_parent"
81                     android:orientation="vertical">
82
83                     <TextView
84                         android:id="@+id/nav_account_summary"
85                         style="@style/nav_button"
86                         android:drawableStart="@drawable/ic_home_black_24dp"
87                         android:onClick="onAccountSummaryClicked"
88                         android:text="@string/account_summary_title" />
89
90                     <TextView
91                         android:id="@+id/nav_latest_transactions"
92                         style="@style/nav_button"
93                         android:drawableStart="@drawable/ic_event_note_black_24dp"
94                         android:onClick="onLatestTransactionsClicked"
95                         android:text="@string/nav_transactions_title" />
96
97                     <TextView
98                         android:id="@+id/textView5"
99                         style="@style/nav_button"
100                         android:drawableStart="@drawable/ic_assignment_black_24dp"
101                         android:text="@string/nav_reports_title"
102                         android:visibility="gone" />
103
104                     <include
105                         android:id="@+id/nav_profile_list_head_layout"
106                         layout="@layout/nav_profile_list_head" />
107
108                     <LinearLayout
109                         android:id="@+id/nav_profile_list_container"
110                         android:layout_width="match_parent"
111                         android:layout_height="wrap_content"
112                         android:animateLayoutChanges="true"
113                         android:nestedScrollingEnabled="false"
114                         android:orientation="vertical">
115
116                         <androidx.recyclerview.widget.RecyclerView
117                             android:id="@+id/nav_profile_list"
118                             android:layout_width="match_parent"
119                             android:layout_height="wrap_content"
120                             android:isScrollContainer="false"
121                             android:nestedScrollingEnabled="false"
122                             android:orientation="vertical">
123
124                         </androidx.recyclerview.widget.RecyclerView>
125
126                     </LinearLayout>
127
128                 </LinearLayout>
129
130             </LinearLayout>
131         </ScrollView>
132
133     </androidx.constraintlayout.widget.ConstraintLayout>
134
135 </com.google.android.material.navigation.NavigationView>