]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/profile_detail.xml
9fa89479cc2c1ba0ff39ef4f43fa63501a35ef03
[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="0dp"
156                 android:layout_height="wrap_content"
157                 android:text="@string/profile_api_version_title"
158                 android:textAppearance="?android:textAppearanceListItem"
159                 android:layout_marginEnd="24dp"
160                 app:layout_constraintEnd_toStartOf="@id/detected_version_text"
161                 app:layout_constraintStart_toStartOf="parent"
162                 app:layout_constraintTop_toTopOf="parent"
163                 />
164
165             <TextView
166                 android:id="@+id/api_version_text"
167                 android:layout_width="0dp"
168                 android:layout_height="wrap_content"
169                 android:textAppearance="?android:textAppearanceListItemSecondary"
170                 android:textColor="?attr/textColor"
171                 app:layout_constraintEnd_toStartOf="@id/detected_version_text"
172                 android:layout_marginEnd="24dp"
173                 app:layout_constraintStart_toStartOf="parent"
174                 app:layout_constraintTop_toBottomOf="@id/api_version_label"
175                 />
176             <TextView
177                 android:id="@+id/detected_version_text"
178                 android:layout_width="wrap_content"
179                 android:layout_height="0dp"
180                 android:layout_marginEnd="8dp"
181                 android:text="@string/api_version_unknown_label"
182                 android:textAppearance="?android:textAppearanceListItemSecondary"
183                 android:textColor="?attr/textColor"
184                 app:layout_constraintEnd_toStartOf="@id/api_version_detect_button"
185                 android:gravity="bottom"
186                 app:layout_constraintBottom_toBottomOf="parent"
187                 app:layout_constraintTop_toTopOf="parent"
188                 />
189             <ProgressBar
190                 android:layout_height="24dp"
191                 android:id="@+id/api_version_detect_button"
192                 android:layout_width="24dp"
193                 android:indeterminate="true"
194                 android:foregroundGravity="bottom"
195                 app:layout_constraintBottom_toBottomOf="parent"
196                 app:layout_constraintEnd_toEndOf="parent"
197                 android:visibility="invisible"
198                 />
199         </androidx.constraintlayout.widget.ConstraintLayout>
200
201         <Switch
202             android:id="@+id/profile_permit_posting"
203             android:layout_width="match_parent"
204             android:layout_height="wrap_content"
205             android:layout_marginBottom="16dp"
206             android:text="@string/posting_permitted"
207             android:textAppearance="?android:textAppearanceListItem"
208             />
209
210         <LinearLayout
211             android:id="@+id/posting_sub_items"
212             android:layout_width="match_parent"
213             android:layout_height="wrap_content"
214             android:orientation="vertical"
215             >
216
217             <LinearLayout
218                 android:id="@+id/default_commodity_layout"
219                 android:layout_width="match_parent"
220                 android:layout_height="wrap_content"
221                 android:layout_marginBottom="16dp"
222                 android:clickable="true"
223                 android:focusable="true"
224                 android:orientation="vertical"
225                 >
226
227                 <TextView
228                     android:layout_width="match_parent"
229                     android:layout_height="wrap_content"
230                     android:text="@string/profile_default_commodity"
231                     android:textAppearance="?android:textAppearanceListItem"
232                     />
233
234                 <TextView
235                     android:id="@+id/default_commodity_text"
236                     android:layout_width="match_parent"
237                     android:layout_height="wrap_content"
238                     android:text="@string/btn_no_currency"
239                     android:textAppearance="?android:textAppearanceListItemSecondary"
240                     android:textColor="?attr/textColor"
241                     />
242             </LinearLayout>
243
244             <Switch
245                 android:id="@+id/profile_show_commodity"
246                 android:layout_width="match_parent"
247                 android:layout_height="wrap_content"
248                 android:layout_marginBottom="16dp"
249                 android:text="@string/currency_input_by_default"
250                 android:textAppearance="?android:textAppearanceListItem"
251                 />
252
253             <Switch
254                 android:id="@+id/profile_show_comments"
255                 android:layout_width="match_parent"
256                 android:layout_height="wrap_content"
257                 android:layout_marginBottom="16dp"
258                 android:text="@string/show_comment_input_by_default"
259                 android:textAppearance="?android:textAppearanceListItem"
260                 />
261
262             <LinearLayout
263                 android:id="@+id/future_dates_layout"
264                 android:layout_width="match_parent"
265                 android:layout_height="wrap_content"
266                 android:layout_marginBottom="16dp"
267                 android:orientation="vertical"
268                 >
269
270                 <TextView
271                     android:id="@+id/future_dates_title"
272                     android:layout_width="match_parent"
273                     android:layout_height="wrap_content"
274                     android:text="@string/profile_future_dates_label"
275                     android:textAppearance="?android:textAppearanceListItem"
276                     />
277
278                 <TextView
279                     android:id="@+id/future_dates_text"
280                     android:layout_width="match_parent"
281                     android:layout_height="wrap_content"
282                     android:textAppearance="?android:textAppearanceListItemSecondary"
283                     android:textColor="?attr/textColor"
284                     />
285             </LinearLayout>
286
287             <com.google.android.material.textfield.TextInputLayout
288                 android:id="@+id/preferred_accounts_accounts_filter_layout"
289                 android:layout_width="match_parent"
290                 android:layout_height="wrap_content"
291                 android:layout_marginBottom="16dp"
292                 android:orientation="vertical"
293                 >
294
295                 <com.google.android.material.textfield.TextInputEditText
296                     android:id="@+id/preferred_accounts_filter_filter"
297                     android:layout_width="match_parent"
298                     android:layout_height="wrap_content"
299                     android:fontFamily="monospace"
300                     android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
301                     android:inputType="text"
302                     android:textColor="?attr/editTextColor"
303                     />
304             </com.google.android.material.textfield.TextInputLayout>
305         </LinearLayout>
306
307         <LinearLayout
308             android:layout_width="match_parent"
309             android:layout_height="match_parent"
310             android:orientation="horizontal"
311             >
312
313             <TextView
314                 android:layout_width="wrap_content"
315                 android:layout_height="match_parent"
316                 android:layout_weight="100"
317                 android:gravity="center_vertical"
318                 android:text="@string/profile_color_label"
319                 android:textAppearance="?android:textAppearanceListItem"
320                 />
321
322             <ImageButton
323                 android:id="@+id/btn_pick_ring_color"
324                 android:layout_width="@dimen/thumb_row_height"
325                 android:layout_height="@dimen/thumb_row_height"
326                 android:layout_weight="1"
327                 android:background="?colorPrimary"
328                 android:contentDescription="@string/btn_color_picker_button"
329                 android:tint="?colorOnPrimarySurface"
330                 app:srcCompat="@drawable/ic_palette_black_24dp"
331                 />
332
333         </LinearLayout>
334
335     </LinearLayout>
336 </LinearLayout>