1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2016-2018 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` prevent `edit_bookmark_display_order_edittext` from being autoselected. -->
29 xmlns:tools="http://schemas.android.com/tools"
30 android:layout_height="wrap_content"
31 android:layout_width="match_parent"
32 android:orientation="vertical"
33 android:focusable="true"
34 android:focusableInTouchMode="true" >
38 android:layout_height="wrap_content"
39 android:layout_width="match_parent"
40 android:layout_marginTop="12dp"
41 android:layout_marginBottom="6dp"
42 android:layout_marginStart="7dp"
43 android:layout_marginEnd="7dp" >
46 android:layout_height="wrap_content"
47 android:layout_width="wrap_content"
48 android:text="@string/database_id"
49 android:textSize="18sp"
50 android:textColor="?android:textColorPrimary"
51 android:layout_marginEnd="8dp" />
54 android:id="@+id/edit_bookmark_database_id_textview"
55 android:layout_height="wrap_content"
56 android:layout_width="wrap_content"
57 android:textSize="18sp"
58 android:textColor="@color/gray_500" />
61 <!-- The icon selection rows. -->
63 android:layout_height="wrap_content"
64 android:layout_width="match_parent"
65 android:orientation="horizontal" >
67 <!-- The column displaying the icons. -->
69 android:layout_height="wrap_content"
70 android:layout_width="wrap_content"
71 android:orientation="vertical"
72 android:layout_marginStart="7dp" >
75 android:id="@+id/edit_bookmark_current_icon"
76 android:layout_width="30dp"
77 android:layout_height="30dp"
78 android:layout_marginTop="6dp"
79 android:layout_marginBottom="6dp"
80 android:layout_gravity="center_vertical"
81 tools:ignore="ContentDescription" />
84 android:id="@+id/edit_bookmark_webpage_favorite_icon"
85 android:layout_width="30dp"
86 android:layout_height="30dp"
87 android:layout_marginTop="6dp"
88 android:layout_marginBottom="6dp"
89 android:layout_gravity="center_vertical"
90 tools:ignore="ContentDescription" />
93 <!-- The column with the `RadioGroup`. -->
95 android:id="@+id/edit_bookmark_icon_radiogroup"
96 android:layout_height="wrap_content"
97 android:layout_width="match_parent"
98 android:checkedButton="@+id/edit_bookmark_current_icon_radiobutton" >
101 android:id="@id/edit_bookmark_current_icon_radiobutton"
102 android:layout_height="wrap_content"
103 android:layout_width="wrap_content"
104 android:layout_marginTop="6dp"
105 android:layout_marginBottom="4dp"
106 android:text="@string/current_bookmark_icon"
107 android:textSize="18sp"
108 android:textColor="?android:textColorPrimary" />
111 android:id="@+id/edit_bookmark_webpage_favorite_icon_radiobutton"
112 android:layout_height="wrap_content"
113 android:layout_width="wrap_content"
114 android:layout_marginTop="5dp"
115 android:text="@string/web_page_favorite_icon"
116 android:textSize="18sp"
117 android:textColor="?android:textColorPrimary" />
121 <!-- Bookmark name. `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
122 <android.support.design.widget.TextInputLayout
123 android:layout_height="wrap_content"
124 android:layout_width="match_parent"
125 android:layout_marginTop="12dp"
126 android:layout_marginBottom="6dp"
127 android:layout_marginStart="4dp"
128 android:layout_marginEnd="4dp" >
130 <!-- `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 `EditText`. -->
131 <android.support.design.widget.TextInputEditText
132 android:id="@+id/edit_bookmark_name_edittext"
133 android:layout_height="wrap_content"
134 android:layout_width="match_parent"
135 android:hint="@string/bookmark_name"
136 android:imeOptions="actionGo"
137 android:inputType="textUri"
138 android:selectAllOnFocus="true" />
139 </android.support.design.widget.TextInputLayout>
141 <!-- URL. `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
142 <android.support.design.widget.TextInputLayout
143 android:layout_height="wrap_content"
144 android:layout_width="match_parent"
145 android:layout_marginTop="6dp"
146 android:layout_marginBottom="6dp"
147 android:layout_marginStart="4dp"
148 android:layout_marginEnd="4dp" >
150 <!-- `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 `EditText`. -->
151 <android.support.design.widget.TextInputEditText
152 android:id="@+id/edit_bookmark_url_edittext"
153 android:layout_height="wrap_content"
154 android:layout_width="match_parent"
155 android:hint="@string/bookmark_url"
156 android:imeOptions="actionGo"
157 android:inputType="textUri"
158 android:selectAllOnFocus="true" />
159 </android.support.design.widget.TextInputLayout>
163 android:layout_height="wrap_content"
164 android:layout_width="match_parent"
165 android:orientation="horizontal"
166 android:layout_marginTop="6dp"
167 android:layout_marginStart="7dp"
168 android:layout_marginEnd="7dp" >
171 android:layout_height="wrap_content"
172 android:layout_width="wrap_content"
173 android:text="@string/folder"
174 android:textSize="18sp"
175 android:textColor="?android:textColorPrimary" />
178 android:id="@+id/edit_bookmark_folder_spinner"
179 android:layout_height="wrap_content"
180 android:layout_width="wrap_content" />
183 <!-- Display order. -->
185 android:layout_height="match_parent"
186 android:layout_width="match_parent"
187 android:orientation="horizontal"
188 android:layout_marginTop="6dp"
189 android:layout_marginBottom="6dp"
190 android:layout_marginStart="7dp"
191 android:layout_marginEnd="7dp" >
194 android:layout_height="wrap_content"
195 android:layout_width="wrap_content"
196 android:text="@string/display_order"
197 android:textSize="18sp"
198 android:textColor="?android:textColorPrimary"
199 android:layout_marginEnd="6dp"
200 android:labelFor="@+id/edit_bookmark_display_order_edittext"/>
203 android:id="@id/edit_bookmark_display_order_edittext"
204 android:layout_height="wrap_content"
205 android:layout_width="match_parent"
206 android:imeOptions="actionGo"
207 android:inputType="number"
208 android:selectAllOnFocus="true"
209 android:importantForAutofill="no"
210 tools:targetApi="26" />