1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2016-2017 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 android:layout_height="wrap_content"
24 android:layout_width="match_parent" >
26 <!-- Setting `android:focusable` and `android:focusableInTouchMode` prevent `edit_bookmark_display_order_edittext` from being autoselected. -->
28 xmlns:tools="http://schemas.android.com/tools"
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/edit_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 <!-- The icon selection rows. -->
62 android:layout_height="wrap_content"
63 android:layout_width="match_parent"
64 android:orientation="horizontal" >
66 <!-- The column displaying the icons. -->
68 android:layout_height="wrap_content"
69 android:layout_width="wrap_content"
70 android:orientation="vertical"
71 android:layout_marginStart="7dp" >
74 android:id="@+id/edit_bookmark_current_icon"
75 android:layout_width="30dp"
76 android:layout_height="30dp"
77 android:layout_marginTop="6dp"
78 android:layout_marginBottom="6dp"
79 android:layout_gravity="center_vertical"
80 tools:ignore="ContentDescription" />
83 android:id="@+id/edit_bookmark_webpage_favorite_icon"
84 android:layout_width="30dp"
85 android:layout_height="30dp"
86 android:layout_marginTop="6dp"
87 android:layout_marginBottom="6dp"
88 android:layout_gravity="center_vertical"
89 tools:ignore="ContentDescription" />
92 <!-- The column with the `RadioGroup`. -->
94 android:id="@+id/edit_bookmark_icon_radiogroup"
95 android:layout_height="wrap_content"
96 android:layout_width="match_parent"
97 android:checkedButton="@+id/edit_bookmark_current_icon_radiobutton" >
100 android:id="@id/edit_bookmark_current_icon_radiobutton"
101 android:layout_height="wrap_content"
102 android:layout_width="wrap_content"
103 android:layout_marginTop="6dp"
104 android:layout_marginBottom="4dp"
105 android:text="@string/current_bookmark_icon"
106 android:textSize="18sp"
107 android:textColor="?android:textColorPrimary" />
110 android:id="@+id/edit_bookmark_webpage_favorite_icon_radiobutton"
111 android:layout_height="wrap_content"
112 android:layout_width="wrap_content"
113 android:layout_marginTop="5dp"
114 android:text="@string/web_page_favorite_icon"
115 android:textSize="18sp"
116 android:textColor="?android:textColorPrimary" />
120 <!-- Bookmark name. `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
121 <android.support.design.widget.TextInputLayout
122 android:layout_height="wrap_content"
123 android:layout_width="match_parent"
124 android:layout_marginTop="12dp"
125 android:layout_marginBottom="6dp"
126 android:layout_marginStart="4dp"
127 android:layout_marginEnd="4dp" >
129 <!-- `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`. -->
130 <android.support.design.widget.TextInputEditText
131 android:id="@+id/edit_bookmark_name_edittext"
132 android:layout_height="wrap_content"
133 android:layout_width="match_parent"
134 android:hint="@string/bookmark_name"
135 android:imeOptions="actionGo"
136 android:inputType="textUri"
137 android:selectAllOnFocus="true" />
138 </android.support.design.widget.TextInputLayout>
140 <!-- URL. `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
141 <android.support.design.widget.TextInputLayout
142 android:layout_height="wrap_content"
143 android:layout_width="match_parent"
144 android:layout_marginTop="6dp"
145 android:layout_marginBottom="6dp"
146 android:layout_marginStart="4dp"
147 android:layout_marginEnd="4dp" >
149 <!-- `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:id="@+id/edit_bookmark_url_edittext"
152 android:layout_height="wrap_content"
153 android:layout_width="match_parent"
154 android:hint="@string/bookmark_url"
155 android:imeOptions="actionGo"
156 android:inputType="textUri"
157 android:selectAllOnFocus="true" />
158 </android.support.design.widget.TextInputLayout>
162 android:layout_height="wrap_content"
163 android:layout_width="match_parent"
164 android:orientation="horizontal"
165 android:layout_marginTop="6dp"
166 android:layout_marginStart="7dp"
167 android:layout_marginEnd="7dp" >
170 android:layout_height="wrap_content"
171 android:layout_width="wrap_content"
172 android:text="@string/folder"
173 android:textSize="18sp"
174 android:textColor="?android:textColorPrimary" />
177 android:id="@+id/edit_bookmark_folder_spinner"
178 android:layout_height="wrap_content"
179 android:layout_width="wrap_content" />
182 <!-- Display order. -->
184 android:layout_height="match_parent"
185 android:layout_width="match_parent"
186 android:orientation="horizontal"
187 android:layout_marginTop="6dp"
188 android:layout_marginBottom="6dp"
189 android:layout_marginStart="7dp"
190 android:layout_marginEnd="7dp" >
193 android:layout_height="wrap_content"
194 android:layout_width="wrap_content"
195 android:text="@string/display_order"
196 android:textSize="18sp"
197 android:textColor="?android:textColorPrimary"
198 android:layout_marginEnd="6dp"
199 android:labelFor="@+id/edit_bookmark_display_order_edittext"/>
202 android:id="@id/edit_bookmark_display_order_edittext"
203 android:layout_height="wrap_content"
204 android:layout_width="match_parent"
205 android:imeOptions="actionGo"
206 android:inputType="number"
207 android:selectAllOnFocus="true" />