]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/profile_detail.xml
6a0d9caf0a573b3ffe902b66bf6540f826019d8a
[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:tools="http://schemas.android.com/tools"
20     xmlns:app="http://schemas.android.com/apk/res-auto"
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/profile_permit_posting"
69             android:layout_width="match_parent"
70             android:layout_height="wrap_content"
71             android:layout_marginBottom="16dp"
72             android:text="@string/posting_permitted" />
73
74         <LinearLayout
75             android:id="@+id/future_dates_layout"
76             android:layout_width="match_parent"
77             android:layout_marginBottom="16dp"
78             android:layout_height="wrap_content"
79             android:orientation="vertical">
80
81             <TextView
82                 android:id="@+id/future_dates_title"
83                 android:textAppearance="?android:textAppearanceListItem"
84                 android:layout_width="match_parent"
85                 android:layout_height="wrap_content"
86                 android:text="@string/profile_future_dates_label" />
87
88             <TextView
89                 android:id="@+id/future_dates_text"
90                 android:textAppearance="?android:textAppearanceListItemSecondary"
91                 android:layout_width="match_parent"
92                 android:layout_height="wrap_content"
93                 android:textColor="?attr/textColor"/>
94         </LinearLayout>
95
96         <Switch
97             android:id="@+id/enable_http_auth"
98             android:layout_width="match_parent"
99             android:layout_height="wrap_content"
100             android:layout_marginBottom="16dp"
101             android:text="@string/pref_title_use_http_auth" />
102
103         <LinearLayout
104             android:id="@+id/auth_params"
105             android:layout_width="match_parent"
106             android:layout_height="wrap_content"
107             android:orientation="vertical"
108             android:paddingStart="8dp"
109             android:animateLayoutChanges="true"
110             tools:ignore="RtlSymmetry">
111
112             <LinearLayout
113                 android:id="@+id/insecure_scheme_text"
114                 android:layout_width="match_parent"
115                 android:layout_height="wrap_content"
116                 android:layout_marginBottom="@dimen/activity_vertical_margin"
117                 android:background="@color/error_background"
118                 android:padding="@dimen/activity_vertical_margin"
119                 android:visibility="gone">
120
121                 <TextView
122                     android:layout_width="match_parent"
123                     android:layout_height="wrap_content"
124                     android:text="@string/insecure_scheme_with_auth" />
125             </LinearLayout>
126
127             <com.google.android.material.textfield.TextInputLayout
128                 android:id="@+id/auth_user_name_layout"
129                 android:layout_width="match_parent"
130                 android:layout_height="wrap_content"
131                 android:layout_marginBottom="16dp"
132                 android:orientation="vertical">
133
134                 <com.google.android.material.textfield.TextInputEditText
135                     android:id="@+id/auth_user_name"
136                     android:layout_width="match_parent"
137                     android:layout_height="wrap_content"
138                     android:ems="10"
139                     android:hint="@string/pref_title_backend_auth_user"
140                     android:inputType="textPersonName" />
141             </com.google.android.material.textfield.TextInputLayout>
142
143             <com.google.android.material.textfield.TextInputLayout
144                 android:id="@+id/password_layout"
145                 android:layout_width="match_parent"
146                 android:layout_height="wrap_content"
147                 android:orientation="vertical"
148                 app:passwordToggleEnabled="true">
149
150                 <com.google.android.material.textfield.TextInputEditText
151                     android:id="@+id/password"
152                     android:layout_width="match_parent"
153                     android:layout_height="wrap_content"
154                     android:ems="10"
155                     android:hint="@string/pref_title_backend_auth_password"
156                     android:inputType="textWebPassword" />
157
158             </com.google.android.material.textfield.TextInputLayout>
159
160         </LinearLayout>
161
162         <com.google.android.material.textfield.TextInputLayout
163             android:id="@+id/preferred_accounts_accounts_filter_layout"
164             android:layout_width="match_parent"
165             android:layout_height="wrap_content"
166             android:layout_marginBottom="16dp"
167             android:orientation="vertical">
168
169             <com.google.android.material.textfield.TextInputEditText
170                 android:id="@+id/preferred_accounts_filter_filter"
171                 android:layout_width="match_parent"
172                 android:layout_height="wrap_content"
173                 android:ems="10"
174                 android:fontFamily="monospace"
175                 android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
176                 android:inputType="text" />
177         </com.google.android.material.textfield.TextInputLayout>
178
179         <LinearLayout
180             android:layout_width="match_parent"
181             android:layout_height="match_parent"
182             android:orientation="horizontal">
183
184             <TextView
185                 android:layout_width="wrap_content"
186                 android:layout_height="match_parent"
187                 android:layout_weight="100"
188                 android:gravity="center_vertical"
189                 android:text="@string/profile_color_label" />
190
191             <ImageButton
192                 android:id="@+id/btn_pick_ring_color"
193                 android:layout_width="@dimen/thumb_row_height"
194                 android:layout_height="@dimen/thumb_row_height"
195                 android:layout_weight="1"
196                 android:background="?colorPrimary"
197                 android:contentDescription="@string/btn_color_picker_button"
198                 android:src="@drawable/ic_palette_black_24dp"
199                 android:tint="?drawer_background" />
200
201         </LinearLayout>
202
203     </LinearLayout>
204 </LinearLayout>