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