1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
6 This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
8 Privacy Browser 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 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. 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` prevents 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/bookmark_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" />
60 <!-- Current icon. -->
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" >
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" />
77 android:id="@+id/current_icon_imageview"
78 android:layout_width="30dp"
79 android:layout_height="30dp"
80 android:layout_gravity="center_vertical"
81 tools:ignore="ContentDescription" />
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_bookmark_icon"
89 android:textSize="18sp"
90 android:textColor="?android:textColorPrimary" />
93 <!-- Webpage favorite icon. -->
95 android:id="@+id/webpage_favorite_icon_linearlayout"
96 android:layout_height="wrap_content"
97 android:layout_width="wrap_content"
98 android:orientation="horizontal"
99 android:layout_marginTop="6dp"
100 android:layout_marginBottom="6dp" >
103 android:id="@+id/webpage_favorite_icon_radiobutton"
104 android:layout_height="wrap_content"
105 android:layout_width="wrap_content"
106 android:layout_gravity="center_vertical" />
109 android:id="@+id/webpage_favorite_icon_imageview"
110 android:layout_height="30dp"
111 android:layout_width="30dp"
112 android:layout_gravity="center_vertical"
113 tools:ignore="ContentDescription" />
116 android:layout_height="wrap_content"
117 android:layout_width="wrap_content"
118 android:layout_marginStart="7dp"
119 android:layout_gravity="center_vertical"
120 android:text="@string/webpage_favorite_icon"
121 android:textSize="18sp"
122 android:textColor="?android:textColorPrimary" />
125 <!-- Bookmark name. The text input layout makes the `android:hint` float above the edit text. -->
126 <com.google.android.material.textfield.TextInputLayout
127 android:layout_height="wrap_content"
128 android:layout_width="match_parent"
129 android:layout_marginTop="12dp"
130 android:layout_marginBottom="6dp"
131 android:layout_marginStart="4dp"
132 android:layout_marginEnd="4dp" >
134 <!-- `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. -->
135 <com.google.android.material.textfield.TextInputEditText
136 android:id="@+id/bookmark_name_edittext"
137 android:layout_height="wrap_content"
138 android:layout_width="match_parent"
139 android:hint="@string/bookmark_name"
140 android:imeOptions="actionGo"
141 android:inputType="textUri"
142 android:selectAllOnFocus="true" />
143 </com.google.android.material.textfield.TextInputLayout>
145 <!-- URL. The text input layout makes the `android:hint` float above the edit text. -->
146 <com.google.android.material.textfield.TextInputLayout
147 android:layout_height="wrap_content"
148 android:layout_width="match_parent"
149 android:layout_marginTop="6dp"
150 android:layout_marginBottom="6dp"
151 android:layout_marginStart="4dp"
152 android:layout_marginEnd="4dp" >
154 <!-- `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. -->
155 <com.google.android.material.textfield.TextInputEditText
156 android:id="@+id/bookmark_url_edittext"
157 android:layout_height="wrap_content"
158 android:layout_width="match_parent"
159 android:hint="@string/bookmark_url"
160 android:imeOptions="actionGo"
161 android:inputType="textUri"
162 android:selectAllOnFocus="true" />
163 </com.google.android.material.textfield.TextInputLayout>
167 android:layout_height="wrap_content"
168 android:layout_width="match_parent"
169 android:orientation="horizontal"
170 android:layout_marginTop="6dp"
171 android:layout_marginStart="7dp"
172 android:layout_marginEnd="7dp" >
175 android:layout_height="wrap_content"
176 android:layout_width="wrap_content"
177 android:text="@string/folder"
178 android:textSize="18sp"
179 android:textColor="?android:textColorPrimary" />
182 android:id="@+id/bookmark_folder_spinner"
183 android:layout_height="wrap_content"
184 android:layout_width="wrap_content" />
187 <!-- Display order. -->
189 android:layout_height="match_parent"
190 android:layout_width="match_parent"
191 android:orientation="horizontal"
192 android:layout_marginTop="6dp"
193 android:layout_marginBottom="6dp"
194 android:layout_marginStart="7dp"
195 android:layout_marginEnd="7dp" >
198 android:layout_height="wrap_content"
199 android:layout_width="wrap_content"
200 android:text="@string/display_order"
201 android:textSize="18sp"
202 android:textColor="?android:textColorPrimary"
203 android:layout_marginEnd="6dp"
204 android:labelFor="@+id/bookmark_display_order_edittext"/>
207 android:id="@id/bookmark_display_order_edittext"
208 android:layout_height="wrap_content"
209 android:layout_width="match_parent"
210 android:imeOptions="actionGo"
211 android:inputType="number"
212 android:selectAllOnFocus="true"
213 android:importantForAutofill="no"
214 tools:targetApi="26" />