]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/profile_detail.xml
0a0463bed302651afd735f222e39e4e1151a7b9a
[mobile-ledger.git] / app / src / main / res / layout / profile_detail.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 <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     <com.google.android.material.textfield.TextInputLayout
30         android:id="@+id/profile_name_layout"
31         android:layout_width="match_parent"
32         android:layout_height="wrap_content"
33         android:layout_marginBottom="16dp">
34
35         <com.google.android.material.textfield.TextInputEditText
36             android:id="@+id/profile_name"
37             android:layout_width="match_parent"
38             android:layout_height="wrap_content"
39             android:ems="10"
40             android:hint="@string/profile_name_label"
41             android:inputType="textPersonName" />
42     </com.google.android.material.textfield.TextInputLayout>
43
44     <com.google.android.material.textfield.TextInputLayout
45         android:id="@+id/url_layout"
46         android:layout_width="match_parent"
47         android:layout_height="wrap_content"
48         android:layout_marginBottom="16dp"
49         android:orientation="vertical">
50
51         <com.google.android.material.textfield.TextInputEditText
52             android:id="@+id/url"
53             android:layout_width="match_parent"
54             android:layout_height="wrap_content"
55             android:ems="10"
56             android:hint="@string/url_label"
57             android:inputType="textUri"
58             android:text="@string/pref_default_backend_url" />
59     </com.google.android.material.textfield.TextInputLayout>
60
61     <LinearLayout
62         android:layout_width="match_parent"
63         android:layout_height="wrap_content"
64         android:animateLayoutChanges="true"
65         android:orientation="vertical">
66
67         <Switch
68             android:id="@+id/enable_http_auth"
69             android:layout_width="match_parent"
70             android:layout_height="wrap_content"
71             android:layout_marginBottom="16dp"
72             android:text="@string/pref_title_use_http_auth"
73             android:textAppearance="?android:textAppearanceListItem" />
74
75         <LinearLayout
76             android:id="@+id/auth_params"
77             android:layout_width="match_parent"
78             android:layout_height="wrap_content"
79             android:layout_marginBottom="16dp"
80             android:animateLayoutChanges="true"
81             android:orientation="vertical"
82             android:paddingStart="8dp"
83             tools:ignore="RtlSymmetry">
84
85             <LinearLayout
86                 android:id="@+id/insecure_scheme_text"
87                 android:layout_width="match_parent"
88                 android:layout_height="wrap_content"
89                 android:layout_marginBottom="@dimen/activity_vertical_margin"
90                 android:background="@color/error_background"
91                 android:padding="@dimen/activity_vertical_margin"
92                 android:visibility="gone">
93
94                 <TextView
95                     android:layout_width="match_parent"
96                     android:layout_height="wrap_content"
97                     android:text="@string/insecure_scheme_with_auth" />
98             </LinearLayout>
99
100             <com.google.android.material.textfield.TextInputLayout
101                 android:id="@+id/auth_user_name_layout"
102                 android:layout_width="match_parent"
103                 android:layout_height="wrap_content"
104                 android:layout_marginBottom="16dp"
105                 android:orientation="vertical">
106
107                 <com.google.android.material.textfield.TextInputEditText
108                     android:id="@+id/auth_user_name"
109                     android:layout_width="match_parent"
110                     android:layout_height="wrap_content"
111                     android:ems="10"
112                     android:hint="@string/pref_title_backend_auth_user"
113                     android:inputType="textPersonName" />
114             </com.google.android.material.textfield.TextInputLayout>
115
116             <com.google.android.material.textfield.TextInputLayout
117                 android:id="@+id/password_layout"
118                 android:layout_width="match_parent"
119                 android:layout_height="wrap_content"
120                 android:orientation="vertical"
121                 app:passwordToggleEnabled="true">
122
123                 <com.google.android.material.textfield.TextInputEditText
124                     android:id="@+id/password"
125                     android:layout_width="match_parent"
126                     android:layout_height="wrap_content"
127                     android:ems="10"
128                     android:hint="@string/pref_title_backend_auth_password"
129                     android:inputType="textWebPassword" />
130
131             </com.google.android.material.textfield.TextInputLayout>
132
133         </LinearLayout>
134
135         <LinearLayout
136             android:id="@+id/api_version_layout"
137             android:orientation="vertical"
138             android:layout_width="match_parent"
139             android:layout_height="wrap_content"
140             android:layout_marginBottom="16dp">
141
142             <TextView
143                 android:layout_width="match_parent"
144                 android:layout_height="wrap_content"
145                 android:text="@string/profile_api_version_title"
146                 android:textAppearance="?android:textAppearanceListItem" />
147
148             <TextView
149                 android:id="@+id/api_version_text"
150                 android:layout_width="match_parent"
151                 android:layout_height="wrap_content"
152                 android:textAppearance="?android:textAppearanceListItemSecondary"
153                 android:textColor="?attr/textColor" />
154         </LinearLayout>
155
156         <Switch
157             android:id="@+id/profile_permit_posting"
158             android:layout_width="match_parent"
159             android:layout_height="wrap_content"
160             android:layout_marginBottom="16dp"
161             android:text="@string/posting_permitted"
162             android:textAppearance="?android:textAppearanceListItem" />
163
164         <LinearLayout
165             android:id="@+id/posting_sub_items"
166             android:layout_width="match_parent"
167             android:layout_height="wrap_content"
168             android:orientation="vertical">
169
170             <LinearLayout
171                 android:id="@+id/default_commodity_layout"
172                 android:layout_width="match_parent"
173                 android:layout_height="wrap_content"
174                 android:layout_marginBottom="16dp"
175                 android:clickable="true"
176                 android:focusable="true"
177                 android:orientation="vertical">
178
179                 <TextView
180                     android:layout_width="match_parent"
181                     android:layout_height="wrap_content"
182                     android:text="@string/profile_default_commodity"
183                     android:textAppearance="?android:textAppearanceListItem" />
184
185                 <TextView
186                     android:id="@+id/default_commodity_text"
187                     android:layout_width="match_parent"
188                     android:layout_height="wrap_content"
189                     android:text="@string/btn_no_currency"
190                     android:textAppearance="?android:textAppearanceListItemSecondary"
191                     android:textColor="?attr/textColor" />
192             </LinearLayout>
193
194             <Switch
195                 android:id="@+id/profile_show_commodity"
196                 android:layout_width="match_parent"
197                 android:layout_height="wrap_content"
198                 android:layout_marginBottom="16dp"
199                 android:text="@string/currency_input_by_default"
200                 android:textAppearance="?android:textAppearanceListItem" />
201
202             <Switch
203                 android:id="@+id/profile_show_comments"
204                 android:layout_width="match_parent"
205                 android:layout_height="wrap_content"
206                 android:layout_marginBottom="16dp"
207                 android:text="@string/show_comment_input_by_default"
208                 android:textAppearance="?android:textAppearanceListItem" />
209
210             <LinearLayout
211                 android:id="@+id/future_dates_layout"
212                 android:layout_width="match_parent"
213                 android:layout_height="wrap_content"
214                 android:layout_marginBottom="16dp"
215                 android:orientation="vertical">
216
217                 <TextView
218                     android:id="@+id/future_dates_title"
219                     android:layout_width="match_parent"
220                     android:layout_height="wrap_content"
221                     android:text="@string/profile_future_dates_label"
222                     android:textAppearance="?android:textAppearanceListItem" />
223
224                 <TextView
225                     android:id="@+id/future_dates_text"
226                     android:layout_width="match_parent"
227                     android:layout_height="wrap_content"
228                     android:textAppearance="?android:textAppearanceListItemSecondary"
229                     android:textColor="?attr/textColor" />
230             </LinearLayout>
231
232             <com.google.android.material.textfield.TextInputLayout
233                 android:id="@+id/preferred_accounts_accounts_filter_layout"
234                 android:layout_width="match_parent"
235                 android:layout_height="wrap_content"
236                 android:layout_marginBottom="16dp"
237                 android:orientation="vertical">
238
239                 <com.google.android.material.textfield.TextInputEditText
240                     android:id="@+id/preferred_accounts_filter_filter"
241                     android:layout_width="match_parent"
242                     android:layout_height="wrap_content"
243                     android:ems="10"
244                     android:fontFamily="monospace"
245                     android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
246                     android:inputType="text"
247                     android:textColor="?attr/editTextColor" />
248             </com.google.android.material.textfield.TextInputLayout>
249         </LinearLayout>
250
251         <LinearLayout
252             android:layout_width="match_parent"
253             android:layout_height="match_parent"
254             android:orientation="horizontal">
255
256             <TextView
257                 android:layout_width="wrap_content"
258                 android:layout_height="match_parent"
259                 android:layout_weight="100"
260                 android:gravity="center_vertical"
261                 android:text="@string/profile_color_label"
262                 android:textAppearance="?android:textAppearanceListItem" />
263
264             <ImageButton
265                 android:id="@+id/btn_pick_ring_color"
266                 android:layout_width="@dimen/thumb_row_height"
267                 android:layout_height="@dimen/thumb_row_height"
268                 android:layout_weight="1"
269                 android:background="?colorPrimary"
270                 android:contentDescription="@string/btn_color_picker_button"
271                 app:srcCompat="@drawable/ic_palette_black_24dp"
272                 android:tint="?drawer_background" />
273
274         </LinearLayout>
275
276     </LinearLayout>
277 </LinearLayout>