]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/res/layout/profile_detail.xml
profile details: validation on save
[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 Mobile-Ledger.
4   ~ Mobile-Ledger 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   ~ Mobile-Ledger 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 Mobile-Ledger. 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     android:textIsSelectable="true"
27     tools:context=".ui.profiles.ProfileDetailFragment">
28
29     <android.support.design.widget.TextInputLayout
30         android:id="@+id/profile_name_layout"
31         android:layout_width="match_parent"
32         android:layout_height="wrap_content">
33
34         <android.support.design.widget.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     </android.support.design.widget.TextInputLayout>
42
43     <android.support.design.widget.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         <android.support.design.widget.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     </android.support.design.widget.TextInputLayout>
59
60     <LinearLayout
61         android:layout_width="match_parent"
62         android:layout_height="wrap_content"
63         android:orientation="vertical">
64
65         <Switch
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
72         <LinearLayout
73             android:id="@+id/auth_params"
74             android:layout_width="match_parent"
75             android:layout_height="wrap_content"
76             android:orientation="vertical"
77             android:paddingStart="8dp"
78             tools:ignore="RtlSymmetry">
79
80             <android.support.design.widget.TextInputLayout
81                 android:id="@+id/auth_user_name_layout"
82                 android:layout_width="match_parent"
83                 android:layout_height="wrap_content"
84                 android:layout_marginBottom="16dp"
85                 android:orientation="vertical">
86
87                 <android.support.design.widget.TextInputEditText
88                     android:id="@+id/auth_user_name"
89                     android:layout_width="match_parent"
90                     android:layout_height="wrap_content"
91                     android:ems="10"
92                     android:hint="@string/pref_title_backend_auth_user"
93                     android:inputType="textPersonName" />
94             </android.support.design.widget.TextInputLayout>
95
96             <android.support.design.widget.TextInputLayout
97                 android:id="@+id/password_layout"
98                 android:layout_width="match_parent"
99                 android:layout_height="wrap_content"
100                 android:orientation="vertical">
101
102                 <android.support.design.widget.TextInputEditText
103                     android:id="@+id/password"
104                     android:layout_width="match_parent"
105                     android:layout_height="wrap_content"
106                     android:ems="10"
107                     android:hint="@string/pref_title_backend_auth_password"
108                     android:inputType="textPassword" />
109
110             </android.support.design.widget.TextInputLayout>
111         </LinearLayout>
112
113
114     </LinearLayout>
115 </LinearLayout>