]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_folder_databaseview_dialog.xml
Allow duplicate bookmark folders. https://redmine.stoutner.com/issues/199
[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-2023 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         <!-- Folder ID. -->
61         <LinearLayout
62             android:layout_height="wrap_content"
63             android:layout_width="match_parent"
64             android:layout_marginTop="6dp"
65             android:layout_marginBottom="6dp"
66             android:layout_marginStart="7dp"
67             android:layout_marginEnd="7dp" >
68
69             <TextView
70                 android:layout_height="wrap_content"
71                 android:layout_width="wrap_content"
72                 android:text="@string/folder_id"
73                 android:textSize="18sp"
74                 android:textColor="?android:textColorPrimary"
75                 android:layout_marginEnd="8dp" />
76
77             <TextView
78                 android:id="@+id/folder_id_textview"
79                 android:layout_height="wrap_content"
80                 android:layout_width="wrap_content"
81                 android:textSize="18sp"
82                 android:textColor="@color/gray_500" />
83         </LinearLayout>
84
85         <!-- Current icon. -->
86         <LinearLayout
87             android:id="@+id/current_icon_linearlayout"
88             android:layout_height="wrap_content"
89             android:layout_width="match_parent"
90             android:orientation="horizontal"
91             android:layout_marginTop="6dp"
92             android:layout_marginBottom="6dp" >
93
94             <RadioButton
95                 android:id="@+id/current_icon_radiobutton"
96                 android:layout_height="wrap_content"
97                 android:layout_width="wrap_content"
98                 android:layout_gravity="center_vertical"
99                 android:checked="true" />
100
101             <ImageView
102                 android:id="@+id/current_icon_imageview"
103                 android:layout_height="30dp"
104                 android:layout_width="30dp"
105                 android:layout_gravity="center_vertical"
106                 tools:ignore="ContentDescription" />
107
108             <TextView
109                 android:layout_height="wrap_content"
110                 android:layout_width="wrap_content"
111                 android:layout_marginStart="7dp"
112                 android:layout_gravity="center_vertical"
113                 android:text="@string/current_folder_icon"
114                 android:textSize="18sp"
115                 android:textColor="?android:textColorPrimary" />
116         </LinearLayout>
117
118         <!-- Default icon. -->
119         <LinearLayout
120             android:id="@+id/default_icon_linearlayout"
121             android:layout_height="wrap_content"
122             android:layout_width="match_parent"
123             android:orientation="horizontal"
124             android:layout_marginTop="6dp"
125             android:layout_marginBottom="6dp" >
126
127             <RadioButton
128                 android:id="@+id/default_icon_radiobutton"
129                 android:layout_height="wrap_content"
130                 android:layout_width="wrap_content"
131                 android:layout_gravity="center_vertical" />
132
133             <ImageView
134                 android:id="@+id/default_icon_imageview"
135                 android:layout_height="30dp"
136                 android:layout_width="30dp"
137                 android:layout_gravity="center_vertical"
138                 android:src="@drawable/folder_blue_bitmap"
139                 tools:ignore="ContentDescription" />
140
141             <TextView
142                 android:layout_height="wrap_content"
143                 android:layout_width="wrap_content"
144                 android:layout_marginStart="7dp"
145                 android:layout_gravity="center_vertical"
146                 android:text="@string/default_folder_icon"
147                 android:textSize="18sp"
148                 android:textColor="?android:textColorPrimary" />
149         </LinearLayout>
150
151         <!-- Webpage favorite icon. -->
152         <LinearLayout
153             android:id="@+id/webpage_favorite_icon_linearlayout"
154             android:layout_height="wrap_content"
155             android:layout_width="match_parent"
156             android:orientation="horizontal"
157             android:layout_marginTop="6dp"
158             android:layout_marginBottom="6dp" >
159
160             <RadioButton
161                 android:id="@+id/webpage_favorite_icon_radiobutton"
162                 android:layout_height="wrap_content"
163                 android:layout_width="wrap_content"
164                 android:layout_gravity="center_vertical" />
165
166             <ImageView
167                 android:id="@+id/webpage_favorite_icon_imageview"
168                 android:layout_height="30dp"
169                 android:layout_width="30dp"
170                 android:layout_gravity="center_vertical"
171                 tools:ignore="ContentDescription" />
172
173             <TextView
174                 android:layout_height="wrap_content"
175                 android:layout_width="wrap_content"
176                 android:layout_marginStart="7dp"
177                 android:layout_gravity="center_vertical"
178                 android:text="@string/webpage_favorite_icon"
179                 android:textSize="18sp"
180                 android:textColor="?android:textColorPrimary" />
181         </LinearLayout>
182
183         <!-- Folder name.  The text input layout makes the `android:hint` float above the edit text. -->
184         <com.google.android.material.textfield.TextInputLayout
185             android:layout_height="wrap_content"
186             android:layout_width="match_parent"
187             android:layout_marginTop="12dp"
188             android:layout_marginBottom="6dp"
189             android:layout_marginStart="4dp"
190             android:layout_marginEnd="4dp" >
191
192             <!-- `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. -->
193             <com.google.android.material.textfield.TextInputEditText
194                 android:id="@+id/folder_name_edittext"
195                 android:layout_height="wrap_content"
196                 android:layout_width="match_parent"
197                 android:hint="@string/folder_name"
198                 android:imeOptions="actionGo"
199                 android:inputType="textUri"
200                 android:selectAllOnFocus="true" />
201         </com.google.android.material.textfield.TextInputLayout>
202
203         <!-- Folder. -->
204         <LinearLayout
205             android:layout_height="wrap_content"
206             android:layout_width="match_parent"
207             android:orientation="horizontal"
208             android:layout_marginTop="6dp"
209             android:layout_marginStart="7dp"
210             android:layout_marginEnd="7dp" >
211
212             <TextView
213                 android:layout_height="wrap_content"
214                 android:layout_width="wrap_content"
215                 android:text="@string/parent_folder"
216                 android:textSize="18sp"
217                 android:textColor="?android:textColorPrimary" />
218
219             <Spinner
220                 android:id="@+id/parent_folder_spinner"
221                 android:layout_height="wrap_content"
222                 android:layout_width="wrap_content" />
223         </LinearLayout>
224
225         <!-- Display order. -->
226         <LinearLayout
227             android:layout_height="match_parent"
228             android:layout_width="match_parent"
229             android:orientation="horizontal"
230             android:layout_marginTop="6dp"
231             android:layout_marginStart="7dp"
232             android:layout_marginEnd="7dp" >
233
234             <TextView
235                 android:layout_height="wrap_content"
236                 android:layout_width="wrap_content"
237                 android:text="@string/display_order"
238                 android:textSize="18sp"
239                 android:textColor="?android:textColorPrimary"
240                 android:layout_marginEnd="6dp"
241                 android:labelFor="@+id/display_order_edittext"/>
242
243             <EditText
244                 android:id="@id/display_order_edittext"
245                 android:layout_height="wrap_content"
246                 android:layout_width="match_parent"
247                 android:imeOptions="actionGo"
248                 android:inputType="number"
249                 android:selectAllOnFocus="true"
250                 android:importantForAutofill="no"
251                 tools:targetApi="26" />
252         </LinearLayout>
253     </LinearLayout>
254 </ScrollView>