]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_folder_databaseview_dialog.xml
First wrong button text in View Headers in night theme. https://redmine.stoutner...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / edit_bookmark_folder_databaseview_dialog.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2016-2022 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
7
8   Privacy Browser Android is free software: you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation, either version 3 of the License, or
11   (at your option) any later version.
12
13   Privacy Browser Android is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18   You should have received a copy of the GNU General Public License
19   along with Privacy Browser Android.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <ScrollView
22     xmlns:android="http://schemas.android.com/apk/res/android"
23     xmlns:tools="http://schemas.android.com/tools"
24     android:layout_height="wrap_content"
25     android:layout_width="match_parent" >
26
27     <!-- Setting `android:focusable` and `android:focusableInTouchMode` prevent the display order edit text from being autoselected. -->
28     <LinearLayout
29         android:layout_height="wrap_content"
30         android:layout_width="match_parent"
31         android:orientation="vertical"
32         android:focusable="true"
33         android:focusableInTouchMode="true" >
34
35         <!-- Database ID. -->
36         <LinearLayout
37             android:layout_height="wrap_content"
38             android:layout_width="match_parent"
39             android:layout_marginTop="12dp"
40             android:layout_marginBottom="6dp"
41             android:layout_marginStart="7dp"
42             android:layout_marginEnd="7dp" >
43
44             <TextView
45                 android:layout_height="wrap_content"
46                 android:layout_width="wrap_content"
47                 android:text="@string/database_id"
48                 android:textSize="18sp"
49                 android:textColor="?android:textColorPrimary"
50                 android:layout_marginEnd="8dp" />
51
52             <TextView
53                 android:id="@+id/folder_database_id_textview"
54                 android:layout_height="wrap_content"
55                 android:layout_width="wrap_content"
56                 android:textSize="18sp"
57                 android:textColor="@color/gray_500" />
58         </LinearLayout>
59
60         <!-- Current icon. -->
61         <LinearLayout
62             android:id="@+id/current_icon_linearlayout"
63             android:layout_height="wrap_content"
64             android:layout_width="match_parent"
65             android:orientation="horizontal"
66             android:layout_marginTop="6dp"
67             android:layout_marginBottom="6dp" >
68
69             <RadioButton
70                 android:id="@+id/current_icon_radiobutton"
71                 android:layout_height="wrap_content"
72                 android:layout_width="wrap_content"
73                 android:layout_gravity="center_vertical"
74                 android:checked="true" />
75
76             <ImageView
77                 android:id="@+id/current_icon_imageview"
78                 android:layout_height="30dp"
79                 android:layout_width="30dp"
80                 android:layout_gravity="center_vertical"
81                 tools:ignore="ContentDescription" />
82
83             <TextView
84                 android:layout_height="wrap_content"
85                 android:layout_width="wrap_content"
86                 android:layout_marginStart="7dp"
87                 android:layout_gravity="center_vertical"
88                 android:text="@string/current_folder_icon"
89                 android:textSize="18sp"
90                 android:textColor="?android:textColorPrimary" />
91         </LinearLayout>
92
93         <!-- Default icon. -->
94         <LinearLayout
95             android:id="@+id/default_icon_linearlayout"
96             android:layout_height="wrap_content"
97             android:layout_width="match_parent"
98             android:orientation="horizontal"
99             android:layout_marginTop="6dp"
100             android:layout_marginBottom="6dp" >
101
102             <RadioButton
103                 android:id="@+id/default_icon_radiobutton"
104                 android:layout_height="wrap_content"
105                 android:layout_width="wrap_content"
106                 android:layout_gravity="center_vertical" />
107
108             <ImageView
109                 android:id="@+id/default_icon_imageview"
110                 android:layout_height="30dp"
111                 android:layout_width="30dp"
112                 android:layout_gravity="center_vertical"
113                 android:src="@drawable/folder_blue_bitmap"
114                 tools:ignore="ContentDescription" />
115
116             <TextView
117                 android:layout_height="wrap_content"
118                 android:layout_width="wrap_content"
119                 android:layout_marginStart="7dp"
120                 android:layout_gravity="center_vertical"
121                 android:text="@string/default_folder_icon"
122                 android:textSize="18sp"
123                 android:textColor="?android:textColorPrimary" />
124         </LinearLayout>
125
126         <!-- Webpage favorite icon. -->
127         <LinearLayout
128             android:id="@+id/webpage_favorite_icon_linearlayout"
129             android:layout_height="wrap_content"
130             android:layout_width="match_parent"
131             android:orientation="horizontal"
132             android:layout_marginTop="6dp"
133             android:layout_marginBottom="6dp" >
134
135             <RadioButton
136                 android:id="@+id/webpage_favorite_icon_radiobutton"
137                 android:layout_height="wrap_content"
138                 android:layout_width="wrap_content"
139                 android:layout_gravity="center_vertical" />
140
141             <ImageView
142                 android:id="@+id/webpage_favorite_icon_imageview"
143                 android:layout_height="30dp"
144                 android:layout_width="30dp"
145                 android:layout_gravity="center_vertical"
146                 tools:ignore="ContentDescription" />
147
148             <TextView
149                 android:layout_height="wrap_content"
150                 android:layout_width="wrap_content"
151                 android:layout_marginStart="7dp"
152                 android:layout_gravity="center_vertical"
153                 android:text="@string/webpage_favorite_icon"
154                 android:textSize="18sp"
155                 android:textColor="?android:textColorPrimary" />
156         </LinearLayout>
157
158         <!-- Folder name.  The text input layout makes the `android:hint` float above the edit text. -->
159         <com.google.android.material.textfield.TextInputLayout
160             android:layout_height="wrap_content"
161             android:layout_width="match_parent"
162             android:layout_marginTop="12dp"
163             android:layout_marginBottom="6dp"
164             android:layout_marginStart="4dp"
165             android:layout_marginEnd="4dp" >
166
167             <!-- `android:imeOptions="actionGo"` sets the keyboard to have a "go" key instead of a "new line" key.  `android:inputType="textUri"` disables spell check in the edit text. -->
168             <com.google.android.material.textfield.TextInputEditText
169                 android:id="@+id/folder_name_edittext"
170                 android:layout_height="wrap_content"
171                 android:layout_width="match_parent"
172                 android:hint="@string/folder_name"
173                 android:imeOptions="actionGo"
174                 android:inputType="textUri"
175                 android:selectAllOnFocus="true" />
176         </com.google.android.material.textfield.TextInputLayout>
177
178         <!-- Folder. -->
179         <LinearLayout
180             android:layout_height="wrap_content"
181             android:layout_width="match_parent"
182             android:orientation="horizontal"
183             android:layout_marginTop="6dp"
184             android:layout_marginStart="7dp"
185             android:layout_marginEnd="7dp" >
186
187             <TextView
188                 android:layout_height="wrap_content"
189                 android:layout_width="wrap_content"
190                 android:text="@string/parent_folder"
191                 android:textSize="18sp"
192                 android:textColor="?android:textColorPrimary" />
193
194             <Spinner
195                 android:id="@+id/parent_folder_spinner"
196                 android:layout_height="wrap_content"
197                 android:layout_width="wrap_content" />
198         </LinearLayout>
199
200         <!-- Display order. -->
201         <LinearLayout
202             android:layout_height="match_parent"
203             android:layout_width="match_parent"
204             android:orientation="horizontal"
205             android:layout_marginTop="6dp"
206             android:layout_marginStart="7dp"
207             android:layout_marginEnd="7dp" >
208
209             <TextView
210                 android:layout_height="wrap_content"
211                 android:layout_width="wrap_content"
212                 android:text="@string/display_order"
213                 android:textSize="18sp"
214                 android:textColor="?android:textColorPrimary"
215                 android:layout_marginEnd="6dp"
216                 android:labelFor="@+id/display_order_edittext"/>
217
218             <EditText
219                 android:id="@id/display_order_edittext"
220                 android:layout_height="wrap_content"
221                 android:layout_width="match_parent"
222                 android:imeOptions="actionGo"
223                 android:inputType="number"
224                 android:selectAllOnFocus="true"
225                 android:importantForAutofill="no"
226                 tools:targetApi="26" />
227         </LinearLayout>
228
229         <TextView
230             android:layout_height="wrap_content"
231             android:layout_width="match_parent"
232             android:gravity="center_horizontal"
233             android:text="@string/folder_names_must_be_unique"
234             android:layout_marginStart="7dp"
235             android:layout_marginEnd="7dp" />
236     </LinearLayout>
237 </ScrollView>