1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright 2016-2024 Soren Stoutner <soren@stoutner.com>.
6 This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
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.
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.
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/>. -->
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" >
27 <!-- Setting `android:focusable` and `android:focusableInTouchMode` prevent the display order edit text from being autoselected. -->
29 android:layout_height="wrap_content"
30 android:layout_width="match_parent"
31 android:orientation="vertical"
32 android:focusable="true"
33 android:focusableInTouchMode="true" >
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" >
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" />
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" />
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" >
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" />
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" />
85 <!-- Current icon. -->
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" >
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" />
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" />
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" />
118 <!-- Default icon. -->
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" >
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" />
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" />
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" />
151 <!-- Webpage favorite icon. -->
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" >
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" />
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" />
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" />
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" >
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>
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" >
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" />
220 android:id="@+id/parent_folder_spinner"
221 android:layout_height="wrap_content"
222 android:layout_width="wrap_content" />
225 <!-- Display order. -->
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" >
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"/>
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" />