]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/main_navigation.xml
reorganization of profile list
[mobile-ledger.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     tools:showIn="@layout/activity_main">
28
29
30     <androidx.constraintlayout.widget.ConstraintLayout
31         android:layout_width="match_parent"
32         android:layout_height="match_parent"
33         android:layout_marginBottom="0dp"
34         android:animateLayoutChanges="true"
35         android:orientation="vertical">
36
37         <LinearLayout
38             android:id="@+id/nav_fixed_items"
39             android:layout_width="match_parent"
40             android:layout_height="wrap_content"
41             android:divider="@drawable/list_divider"
42             android:elevation="2dp"
43             android:orientation="vertical"
44             android:showDividers="beginning"
45             android:visibility="gone"
46             app:layout_constraintBottom_toBottomOf="parent">
47
48             <TextView
49                 android:id="@+id/textView2"
50                 style="@style/nav_button"
51                 android:layout_weight="1"
52                 android:drawableStart="@drawable/ic_settings_black_24dp"
53                 android:onClick="navSettingsClicked"
54                 android:text="@string/action_settings" />
55
56         </LinearLayout>
57
58         <ScrollView
59             android:layout_width="0dp"
60             android:layout_height="0dp"
61             app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
62             app:layout_constraintEnd_toEndOf="parent"
63             app:layout_constraintLeft_toLeftOf="parent"
64             app:layout_constraintStart_toStartOf="parent"
65             app:layout_constraintTop_toTopOf="parent">
66
67             <LinearLayout
68                 android:id="@+id/nav_upper"
69                 android:layout_width="match_parent"
70                 android:layout_height="wrap_content"
71                 android:animateLayoutChanges="true"
72                 android:divider="@drawable/list_divider_inside_out"
73                 android:orientation="vertical"
74                 android:showDividers="beginning"
75                 app:layout_constraintBottom_toTopOf="@+id/nav_fixed_items"
76                 app:layout_constraintTop_toBottomOf="@+id/nav_header">
77
78                 <LinearLayout
79                     android:id="@+id/nav_header"
80                     android:layout_width="match_parent"
81                     android:layout_height="wrap_content"
82                     android:background="@drawable/side_nav_bar"
83                     android:gravity="center_vertical"
84                     android:orientation="horizontal"
85                     android:padding="@dimen/activity_vertical_margin"
86                     android:theme="@style/ThemeOverlay.AppCompat.Dark"
87                     app:layout_constraintTop_toTopOf="parent">
88
89                     <include layout="@layout/nav_header_logo" />
90
91                     <LinearLayout
92                         android:layout_width="match_parent"
93                         android:layout_height="match_parent"
94                         android:layout_marginStart="@dimen/activity_horizontal_margin"
95                         android:layout_marginEnd="@dimen/activity_horizontal_margin"
96                         android:gravity="center_vertical"
97                         android:orientation="vertical">
98
99                         <TextView
100                             android:layout_width="match_parent"
101                             android:layout_height="wrap_content"
102                             android:text="@string/app_name"
103                             android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
104
105                         <TextView
106                             android:id="@+id/drawer_version_text"
107                             android:layout_width="wrap_content"
108                             android:layout_height="wrap_content"
109                             android:text="dummy version"
110                             tools:ignore="HardcodedText" />
111                     </LinearLayout>
112
113                 </LinearLayout>
114
115                 <LinearLayout
116                     android:id="@+id/nav_actions"
117                     android:layout_width="match_parent"
118                     android:layout_height="match_parent"
119                     android:orientation="vertical">
120
121                     <TextView
122                         android:id="@+id/nav_account_summary"
123                         style="@style/nav_button"
124                         android:drawableStart="@drawable/ic_home_black_24dp"
125                         android:onClick="onAccountSummaryClicked"
126                         android:text="@string/account_summary_title" />
127
128                     <TextView
129                         android:id="@+id/nav_latest_transactions"
130                         style="@style/nav_button"
131                         android:drawableStart="@drawable/ic_event_note_black_24dp"
132                         android:onClick="onLatestTransactionsClicked"
133                         android:text="@string/nav_transactions_title" />
134
135                     <TextView
136                         android:id="@+id/textView5"
137                         style="@style/nav_button"
138                         android:drawableStart="@drawable/ic_assignment_black_24dp"
139                         android:text="@string/nav_reports_title"
140                         android:visibility="gone" />
141
142                     <include
143                         android:id="@+id/nav_profile_list_head_layout"
144                         layout="@layout/nav_profile_list_head" />
145
146                     <LinearLayout
147                         android:id="@+id/nav_profile_list_container"
148                         android:layout_width="match_parent"
149                         android:layout_height="wrap_content"
150                         android:animateLayoutChanges="true"
151                         android:nestedScrollingEnabled="false"
152                         android:orientation="vertical">
153
154                         <androidx.recyclerview.widget.RecyclerView
155                             android:id="@+id/nav_profile_list"
156                             android:layout_width="match_parent"
157                             android:layout_height="wrap_content"
158                             android:isScrollContainer="false"
159                             android:nestedScrollingEnabled="false"
160                             android:orientation="vertical"
161                             android:paddingStart="0dp">
162
163                         </androidx.recyclerview.widget.RecyclerView>
164
165                     </LinearLayout>
166
167                 </LinearLayout>
168
169             </LinearLayout>
170         </ScrollView>
171
172     </androidx.constraintlayout.widget.ConstraintLayout>
173
174 </com.google.android.material.navigation.NavigationView>