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.
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.
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/>.
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">
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">
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:hint="@string/profile_name_label"
40 android:inputType="textPersonName" />
41 </com.google.android.material.textfield.TextInputLayout>
43 <com.google.android.material.textfield.TextInputLayout
44 android:id="@+id/url_layout"
45 android:layout_width="match_parent"
46 android:layout_height="wrap_content"
47 android:layout_marginBottom="16dp"
48 android:orientation="vertical">
50 <com.google.android.material.textfield.TextInputEditText
52 android:layout_width="match_parent"
53 android:layout_height="wrap_content"
54 android:hint="@string/url_label"
55 android:inputType="textUri"
56 android:text="@string/pref_default_backend_url" />
57 </com.google.android.material.textfield.TextInputLayout>
60 android:layout_width="match_parent"
61 android:layout_height="wrap_content"
62 android:animateLayoutChanges="true"
63 android:orientation="vertical">
66 android:id="@+id/enable_http_auth"
67 android:layout_width="match_parent"
68 android:layout_height="wrap_content"
69 android:layout_marginBottom="16dp"
70 android:text="@string/pref_title_use_http_auth"
71 android:textAppearance="?android:textAppearanceListItem" />
74 android:id="@+id/auth_params"
75 android:layout_width="match_parent"
76 android:layout_height="wrap_content"
77 android:layout_marginBottom="16dp"
78 android:animateLayoutChanges="true"
79 android:orientation="vertical"
80 android:paddingStart="8dp"
81 tools:ignore="RtlSymmetry">
84 android:id="@+id/insecure_scheme_text"
85 android:layout_width="match_parent"
86 android:layout_height="wrap_content"
87 android:layout_marginBottom="@dimen/activity_vertical_margin"
88 android:background="?colorError"
89 android:padding="@dimen/activity_vertical_margin"
90 android:visibility="gone">
93 android:layout_width="match_parent"
94 android:layout_height="wrap_content"
95 android:textColor="?colorOnError"
96 android:text="@string/insecure_scheme_with_auth" />
99 <com.google.android.material.textfield.TextInputLayout
100 android:id="@+id/auth_user_name_layout"
101 android:layout_width="match_parent"
102 android:layout_height="wrap_content"
103 android:layout_marginBottom="16dp"
104 android:orientation="vertical">
106 <com.google.android.material.textfield.TextInputEditText
107 android:id="@+id/auth_user_name"
108 android:layout_width="match_parent"
109 android:layout_height="wrap_content"
110 android:hint="@string/pref_title_backend_auth_user"
111 android:inputType="textPersonName" />
112 </com.google.android.material.textfield.TextInputLayout>
114 <com.google.android.material.textfield.TextInputLayout
115 android:id="@+id/password_layout"
116 android:layout_width="match_parent"
117 android:layout_height="wrap_content"
118 android:orientation="vertical"
119 app:passwordToggleEnabled="true">
121 <com.google.android.material.textfield.TextInputEditText
122 android:id="@+id/password"
123 android:layout_width="match_parent"
124 android:layout_height="wrap_content"
125 android:hint="@string/pref_title_backend_auth_password"
126 android:inputType="textWebPassword" />
128 </com.google.android.material.textfield.TextInputLayout>
133 android:id="@+id/api_version_layout"
134 android:orientation="vertical"
135 android:layout_width="match_parent"
136 android:layout_height="wrap_content"
137 android:layout_marginBottom="16dp">
140 android:layout_width="match_parent"
141 android:layout_height="wrap_content"
142 android:text="@string/profile_api_version_title"
143 android:textAppearance="?android:textAppearanceListItem" />
146 android:id="@+id/api_version_text"
147 android:layout_width="match_parent"
148 android:layout_height="wrap_content"
149 android:textAppearance="?android:textAppearanceListItemSecondary"
150 android:textColor="?attr/textColor" />
154 android:id="@+id/profile_permit_posting"
155 android:layout_width="match_parent"
156 android:layout_height="wrap_content"
157 android:layout_marginBottom="16dp"
158 android:text="@string/posting_permitted"
159 android:textAppearance="?android:textAppearanceListItem" />
162 android:id="@+id/posting_sub_items"
163 android:layout_width="match_parent"
164 android:layout_height="wrap_content"
165 android:orientation="vertical">
168 android:id="@+id/default_commodity_layout"
169 android:layout_width="match_parent"
170 android:layout_height="wrap_content"
171 android:layout_marginBottom="16dp"
172 android:clickable="true"
173 android:focusable="true"
174 android:orientation="vertical">
177 android:layout_width="match_parent"
178 android:layout_height="wrap_content"
179 android:text="@string/profile_default_commodity"
180 android:textAppearance="?android:textAppearanceListItem" />
183 android:id="@+id/default_commodity_text"
184 android:layout_width="match_parent"
185 android:layout_height="wrap_content"
186 android:text="@string/btn_no_currency"
187 android:textAppearance="?android:textAppearanceListItemSecondary"
188 android:textColor="?attr/textColor" />
192 android:id="@+id/profile_show_commodity"
193 android:layout_width="match_parent"
194 android:layout_height="wrap_content"
195 android:layout_marginBottom="16dp"
196 android:text="@string/currency_input_by_default"
197 android:textAppearance="?android:textAppearanceListItem" />
200 android:id="@+id/profile_show_comments"
201 android:layout_width="match_parent"
202 android:layout_height="wrap_content"
203 android:layout_marginBottom="16dp"
204 android:text="@string/show_comment_input_by_default"
205 android:textAppearance="?android:textAppearanceListItem" />
208 android:id="@+id/future_dates_layout"
209 android:layout_width="match_parent"
210 android:layout_height="wrap_content"
211 android:layout_marginBottom="16dp"
212 android:orientation="vertical">
215 android:id="@+id/future_dates_title"
216 android:layout_width="match_parent"
217 android:layout_height="wrap_content"
218 android:text="@string/profile_future_dates_label"
219 android:textAppearance="?android:textAppearanceListItem" />
222 android:id="@+id/future_dates_text"
223 android:layout_width="match_parent"
224 android:layout_height="wrap_content"
225 android:textAppearance="?android:textAppearanceListItemSecondary"
226 android:textColor="?attr/textColor" />
229 <com.google.android.material.textfield.TextInputLayout
230 android:id="@+id/preferred_accounts_accounts_filter_layout"
231 android:layout_width="match_parent"
232 android:layout_height="wrap_content"
233 android:layout_marginBottom="16dp"
234 android:orientation="vertical">
236 <com.google.android.material.textfield.TextInputEditText
237 android:id="@+id/preferred_accounts_filter_filter"
238 android:layout_width="match_parent"
239 android:layout_height="wrap_content"
240 android:fontFamily="monospace"
241 android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
242 android:inputType="text"
243 android:textColor="?attr/editTextColor" />
244 </com.google.android.material.textfield.TextInputLayout>
248 android:layout_width="match_parent"
249 android:layout_height="match_parent"
250 android:orientation="horizontal">
253 android:layout_width="wrap_content"
254 android:layout_height="match_parent"
255 android:layout_weight="100"
256 android:gravity="center_vertical"
257 android:text="@string/profile_color_label"
258 android:textAppearance="?android:textAppearanceListItem" />
261 android:id="@+id/btn_pick_ring_color"
262 android:layout_width="@dimen/thumb_row_height"
263 android:layout_height="@dimen/thumb_row_height"
264 android:layout_weight="1"
265 android:background="?colorPrimary"
266 android:contentDescription="@string/btn_color_picker_button"
267 app:srcCompat="@drawable/ic_palette_black_24dp"
268 android:tint="?colorOnPrimarySurface"