]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/profile_detail.xml
warn when using authentication with insecure HTTP scheme
[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     android:id="@+id/profile_detail"
21     style="?android:attr/textAppearanceLarge"
22     android:layout_width="match_parent"
23     android:layout_height="match_parent"
24     android:orientation="vertical"
25     android:padding="16dp"
26     tools:context=".ui.profiles.ProfileDetailFragment">
27
28     <com.google.android.material.textfield.TextInputLayout
29         android:id="@+id/profile_name_layout"
30         android:layout_width="match_parent"
31         android:layout_height="wrap_content"
32         android:layout_marginBottom="16dp">
33
34         <com.google.android.material.textfield.TextInputEditText
35             android:id="@+id/profile_name"
36             android:layout_width="match_parent"
37             android:layout_height="wrap_content"
38             android:ems="10"
39             android:hint="@string/profile_name_label"
40             android:inputType="textPersonName" />
41     </com.google.android.material.textfield.TextInputLayout>
42
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">
49
50         <com.google.android.material.textfield.TextInputEditText
51             android:id="@+id/url"
52             android:layout_width="match_parent"
53             android:layout_height="wrap_content"
54             android:ems="10"
55             android:hint="@string/url_label"
56             android:inputType="textUri"
57             android:text="@string/pref_default_backend_url" />
58     </com.google.android.material.textfield.TextInputLayout>
59
60     <LinearLayout
61         android:layout_width="match_parent"
62         android:layout_height="wrap_content"
63         android:animateLayoutChanges="true"
64         android:orientation="vertical">
65
66         <Switch
67             android:id="@+id/profile_permit_posting"
68             android:layout_width="match_parent"
69             android:layout_height="wrap_content"
70             android:layout_marginBottom="16dp"
71             android:text="@string/posting_permitted" />
72
73         <Switch
74             android:id="@+id/enable_http_auth"
75             android:layout_width="match_parent"
76             android:layout_height="wrap_content"
77             android:layout_marginBottom="16dp"
78             android:text="@string/pref_title_use_http_auth" />
79
80         <LinearLayout
81             android:id="@+id/auth_params"
82             android:layout_width="match_parent"
83             android:layout_height="wrap_content"
84             android:orientation="vertical"
85             android:paddingStart="8dp"
86             android:animateLayoutChanges="true"
87             tools:ignore="RtlSymmetry">
88
89             <LinearLayout
90                 android:id="@+id/insecure_scheme_text"
91                 android:layout_width="match_parent"
92                 android:layout_height="wrap_content"
93                 android:layout_marginBottom="@dimen/activity_vertical_margin"
94                 android:background="@color/error_background"
95                 android:padding="@dimen/activity_vertical_margin"
96                 android:visibility="gone">
97
98                 <TextView
99                     android:layout_width="match_parent"
100                     android:layout_height="wrap_content"
101                     android:text="@string/insecure_scheme_with_auth" />
102             </LinearLayout>
103
104             <com.google.android.material.textfield.TextInputLayout
105                 android:id="@+id/auth_user_name_layout"
106                 android:layout_width="match_parent"
107                 android:layout_height="wrap_content"
108                 android:layout_marginBottom="16dp"
109                 android:orientation="vertical">
110
111                 <com.google.android.material.textfield.TextInputEditText
112                     android:id="@+id/auth_user_name"
113                     android:layout_width="match_parent"
114                     android:layout_height="wrap_content"
115                     android:ems="10"
116                     android:hint="@string/pref_title_backend_auth_user"
117                     android:inputType="textPersonName" />
118             </com.google.android.material.textfield.TextInputLayout>
119
120             <com.google.android.material.textfield.TextInputLayout
121                 android:id="@+id/password_layout"
122                 android:layout_width="match_parent"
123                 android:layout_height="wrap_content"
124                 android:orientation="vertical">
125
126                 <com.google.android.material.textfield.TextInputEditText
127                     android:id="@+id/password"
128                     android:layout_width="match_parent"
129                     android:layout_height="wrap_content"
130                     android:ems="10"
131                     android:hint="@string/pref_title_backend_auth_password"
132                     android:inputType="textPassword" />
133
134             </com.google.android.material.textfield.TextInputLayout>
135
136         </LinearLayout>
137
138         <com.google.android.material.textfield.TextInputLayout
139             android:id="@+id/preferred_accounts_accounts_filter_layout"
140             android:layout_width="match_parent"
141             android:layout_height="wrap_content"
142             android:layout_marginBottom="16dp"
143             android:orientation="vertical">
144
145             <com.google.android.material.textfield.TextInputEditText
146                 android:id="@+id/preferred_accounts_filter_filter"
147                 android:layout_width="match_parent"
148                 android:layout_height="wrap_content"
149                 android:ems="10"
150                 android:fontFamily="monospace"
151                 android:hint="@string/pref_preferred_autocompletion_account_filter_hint"
152                 android:inputType="text" />
153         </com.google.android.material.textfield.TextInputLayout>
154
155         <LinearLayout
156             android:layout_width="match_parent"
157             android:layout_height="match_parent"
158             android:orientation="horizontal">
159
160             <TextView
161                 android:layout_width="wrap_content"
162                 android:layout_height="match_parent"
163                 android:layout_weight="100"
164                 android:gravity="center_vertical"
165                 android:text="@string/profile_color_label" />
166
167             <ImageButton
168                 android:id="@+id/btn_pick_ring_color"
169                 android:layout_width="@dimen/thumb_row_height"
170                 android:layout_height="@dimen/thumb_row_height"
171                 android:layout_weight="1"
172                 android:background="?colorPrimary"
173                 android:contentDescription="@string/btn_color_picker_button"
174                 android:src="@drawable/ic_palette_black_24dp"
175                 android:tint="?drawer_background" />
176
177         </LinearLayout>
178
179     </LinearLayout>
180 </LinearLayout>