]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/profile_detail.xml
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / res / layout / profile_detail.xml
1 <?xml version="1.0" encoding="utf-8"?><!--
2   ~ Copyright © 2020 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 <LinearLayout 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/profile_detail"
22     style="?android:attr/textAppearanceLarge"
23     android:layout_width="match_parent"
24     android:layout_height="match_parent"
25     android:orientation="vertical"
26     android:padding="16dp"
27     tools:context=".ui.profiles.ProfileDetailFragment"
28     >
29
30     <com.google.android.material.textfield.TextInputLayout
31         android:id="@+id/profile_name_layout"
32         android:layout_width="match_parent"
33         android:layout_height="wrap_content"
34         android:layout_marginBottom="16dp"
35         >
36
37         <com.google.android.material.textfield.TextInputEditText
38             android:id="@+id/profile_name"
39             android:layout_width="match_parent"
40             android:layout_height="wrap_content"
41             android:hint="@string/profile_name_label"
42             android:inputType="textPersonName"
43             />
44     </com.google.android.material.textfield.TextInputLayout>
45
46     <com.google.android.material.textfield.TextInputLayout
47         android:id="@+id/url_layout"
48         android:layout_width="match_parent"
49         android:layout_height="wrap_content"
50         android:layout_marginBottom="16dp"
51         android:orientation="vertical"
52         >
53
54         <com.google.android.material.textfield.TextInputEditText
55             android:id="@+id/url"
56             android:layout_width="match_parent"
57             android:layout_height="wrap_content"
58             android:hint="@string/url_label"
59             android:inputType="textUri"
60             android:text="@string/pref_default_backend_url"
61             />
62     </com.google.android.material.textfield.TextInputLayout>
63
64     <LinearLayout
65         android:layout_width="match_parent"
66         android:layout_height="wrap_content"
67         android:animateLayoutChanges="true"
68         android:orientation="vertical"
69         >
70
71         <Switch
72             android:id="@+id/enable_http_auth"
73             android:layout_width="match_parent"
74             android:layout_height="wrap_content"
75             android:layout_marginBottom="16dp"
76             android:text="@string/pref_title_use_http_auth"
77             android:textAppearance="?android:textAppearanceListItem"
78             />
79
80         <LinearLayout
81             android:id="@+id/auth_params"
82             android:layout_width="match_parent"
83             android:layout_height="wrap_content"
84             android:layout_marginBottom="16dp"
85             android:animateLayoutChanges="true"
86             android:orientation="vertical"
87             android:paddingStart="8dp"
88             tools:ignore="RtlSymmetry"
89             >
90
91             <LinearLayout
92                 android:id="@+id/insecure_scheme_text"
93                 android:layout_width="match_parent"
94                 android:layout_height="wrap_content"
95                 android:layout_marginBottom="@dimen/activity_vertical_margin"
96                 android:background="?colorError"
97                 android:padding="@dimen/activity_vertical_margin"
98                 android:visibility="gone"
99                 >
100
101                 <TextView
102                     android:layout_width="match_parent"
103                     android:layout_height="wrap_content"
104                     android:text="@string/insecure_scheme_with_auth"
105                     android:textColor="?colorOnError"
106                     />
107             </LinearLayout>
108
109             <com.google.android.material.textfield.TextInputLayout
110                 android:id="@+id/auth_user_name_layout"
111                 android:layout_width="match_parent"
112                 android:layout_height="wrap_content"
113                 android:layout_marginBottom="16dp"
114                 android:orientation="vertical"
115                 >
116
117                 <com.google.android.material.textfield.TextInputEditText
118                     android:id="@+id/auth_user_name"
119                     android:layout_width="match_parent"
120                     android:layout_height="wrap_content"
121                     android:hint="@string/pref_title_backend_auth_user"
122                     android:inputType="textPersonName"
123                     />
124             </com.google.android.material.textfield.TextInputLayout>
125
126             <com.google.android.material.textfield.TextInputLayout
127                 android:id="@+id/password_layout"
128                 android:layout_width="match_parent"
129                 android:layout_height="wrap_content"
130                 android:orientation="vertical"
131                 app:passwordToggleEnabled="true"
132                 >
133
134                 <com.google.android.material.textfield.TextInputEditText
135                     android:id="@+id/password"
136                     android:layout_width="match_parent"
137                     android:layout_height="wrap_content"
138                     android:hint="@string/pref_title_backend_auth_password"
139                     android:inputType="textWebPassword"
140                     />
141
142             </com.google.android.material.textfield.TextInputLayout>
143
144         </LinearLayout>
145
146         <androidx.constraintlayout.widget.ConstraintLayout
147             android:id="@+id/api_version_layout"
148             android:layout_width="match_parent"
149             android:layout_height="wrap_content"
150             android:layout_marginBottom="16dp"
151             >
152
153             <TextView
154                 android:id="@+id/api_version_label"
155                 android:layout_width="match_parent"
156                 android:layout_height="wrap_content"
157                 android:text="@string/profile_api_version_title"
158                 android:textAppearance="?android:textAppearanceListItem"
159                 app:layout_constraintTop_toTopOf="parent"
160                 />
161
162             <TextView
163                 android:id="@+id/api_version_text"
164                 android:layout_width="0dp"
165                 android:layout_height="wrap_content"
166                 android:textAppearance="?android:textAppearanceListItemSecondary"
167                 android:textColor="?attr/textColor"
168                 app:layout_constraintEnd_toStartOf="@id/detected_version_text"
169                 app:layout_constraintStart_toStartOf="parent"
170                 app:layout_constraintTop_toBottomOf="@id/api_version_label"
171                 />
172             <TextView
173                 android:id="@+id/detected_version_label"
174                 android:layout_width="0dp"
175                 android:layout_height="wrap_content"
176                 android:layout_marginEnd="8dp"
177                 android:gravity="end"
178                 android:text="@string/detected_version_label"
179                 android:textAppearance="?android:textAppearanceListItemSecondary"
180                 app:layout_constraintEnd_toStartOf="@id/detected_version_text"
181                 app:layout_constraintStart_toStartOf="parent"
182                 app:layout_constraintTop_toBottomOf="@id/api_version_text"
183                 />
184             <TextView
185                 android:id="@+id/detected_version_text"
186                 android:layout_width="wrap_content"
187                 android:layout_height="wrap_content"
188                 android:layout_marginEnd="8dp"
189                 android:text="@string/api_version_unknown_label"
190                 android:textAppearance="?android:textAppearanceListItemSecondary"
191                 android:textColor="?attr/textColor"
192                 app:layout_constraintEnd_toStartOf="@id/api_version_detect_button"
193                 app:layout_constraintTop_toBottomOf="@id/api_version_text"
194                 />
195             <TextView
196                 android:id="@+id/api_version_detect_button"
197                 android:layout_width="24dp"
198                 android:layout_height="0dp"
199                 android:drawableBottom="@drawable/ic_refresh_primary_24dp"
200                 android:foregroundGravity="bottom"
201                 app:layout_constraintBottom_toBottomOf="parent"
202                 app:layout_constraintEnd_toEndOf="parent"
203                 app:layout_constraintTop_toBottomOf="@id/api_version_label"
204                 />
205         </androidx.constraintlayout.widget.ConstraintLayout>
206
207         <Switch
208             android:id="@+id/profile_permit_posting"
209             android:layout_width="match_parent"
210             android:layout_height="wrap_content"
211             android:layout_marginBottom="16dp"
212             android:text="@string/posting_permitted"
213             android:textAppearance="?android:textAppearanceListItem"
214             />
215
216         <LinearLayout
217             android:id="@+id/posting_sub_items"
218             android:layout_width="match_parent"
219             android:layout_height="wrap_content"
220             android:orientation="vertical"
221             >
222
223             <LinearLayout
224                 android:id="@+id/default_commodity_layout"
225                 android:layout_width="match_parent"
226                 android:layout_height="wrap_content"
227                 android:layout_marginBottom="16dp"
228                 android:clickable="true"
229                 android:focusable="true"
230                 android:orientation="vertical"
231                 >
232
233                 <TextView
234                     android:layout_width="match_parent"
235                     android:layout_height="wrap_content"
236                     android:text="@string/profile_default_commodity"
237                     android:textAppearance="?android:textAppearanceListItem"
238                     />
239
240                 <TextView
241                     android:id="@+id/default_commodity_text"
242                     android:layout_width="match_parent"
243                     android:layout_height="wrap_content"
244                     android:text="@string/btn_no_currency"
245                     android:textAppearance="?android:textAppearanceListItemSecondary"
246                     android:textColor="?attr/textColor"
247                     />
248             </LinearLayout>
249
250             <Switch
251                 android:id="@+id/profile_show_commodity"
252                 android:layout_width="match_parent"
253                 android:layout_height="wrap_content"
254                 android:layout_marginBottom="16dp"
255                 android:text="@string/currency_input_by_default"
256                 android:textAppearance="?android:textAppearanceListItem"
257                 />
258
259             <Switch
260                 android:id="@+id/profile_show_comments"
261                 android:layout_width="match_parent"
262                 android:layout_height="wrap_content"
263                 android:layout_marginBottom="16dp"
264                 android:text="@string/show_comment_input_by_default"
265                 android:textAppearance="?android:textAppearanceListItem"
266                 />
267
268             <LinearLayout
269                 android:id="@+id/future_dates_layout"
270                 android:layout_width="match_parent"
271                 android:layout_height="wrap_content"
272                 android:layout_marginBottom="16dp"
273                 android:orientation="vertical"
274                 >
275
276                 <TextView
277                     android:id="@+id/future_dates_title"
278                     android:layout_width="match_parent"
279                     android:layout_height="wrap_content"
280                     android:text="@string/profile_future_dates_label"
281                     android:textAppearance="?android:textAppearanceListItem"
282                     />
283
284                 <TextView
285                     android:id="@+id/future_dates_text"
286                     android:layout_width="match_parent"
287                     android:layout_height="wrap_content"
288                     android:textAppearance="?android:textAppearanceListItemSecondary"
289                     android:textColor="?attr/textColor"
290                     />
291             </LinearLayout>
292
293             <com.google.android.material.textfield.TextInputLayout
294                 android:id="@+id/preferred_accounts_accounts_filter_layout"
295                 android:layout_width="match_parent"
296                 android:layout_height="wrap_content"
297                 android:layout_marginBottom="16dp"
298                 android:orientation="vertical"
299                 >
300
301                 <com.google.android.material.textfield.TextInputEditText
302                     android:id="@+id/preferred_accounts_filter_filter"
303                     android:layout_width="match_parent"
304                     android:layout_height="wrap_content"
305                     android:fontFamily="monospace"
306                     android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
307                     android:inputType="text"
308                     android:textColor="?attr/editTextColor"
309                     />
310             </com.google.android.material.textfield.TextInputLayout>
311         </LinearLayout>
312
313         <LinearLayout
314             android:layout_width="match_parent"
315             android:layout_height="match_parent"
316             android:orientation="horizontal"
317             >
318
319             <TextView
320                 android:layout_width="wrap_content"
321                 android:layout_height="match_parent"
322                 android:layout_weight="100"
323                 android:gravity="center_vertical"
324                 android:text="@string/profile_color_label"
325                 android:textAppearance="?android:textAppearanceListItem"
326                 />
327
328             <ImageButton
329                 android:id="@+id/btn_pick_ring_color"
330                 android:layout_width="@dimen/thumb_row_height"
331                 android:layout_height="@dimen/thumb_row_height"
332                 android:layout_weight="1"
333                 android:background="?colorPrimary"
334                 android:contentDescription="@string/btn_color_picker_button"
335                 android:tint="?colorOnPrimarySurface"
336                 app:srcCompat="@drawable/ic_palette_black_24dp"
337                 />
338
339         </LinearLayout>
340
341     </LinearLayout>
342 </LinearLayout>