]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_databaseview_dialog.xml
First wrong button text in View Headers in night theme. https://redmine.stoutner...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / edit_bookmark_databaseview_dialog.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright 2016-2024 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` prevents 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/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" />
58         </LinearLayout>
59
60         <!-- Current icon. -->
61         <LinearLayout
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" >
68
69             <RadioButton
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" />
75
76             <ImageView
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" />
82
83             <TextView
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" />
91         </LinearLayout>
92
93         <!-- Webpage favorite icon. -->
94         <LinearLayout
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" >
101
102             <RadioButton
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" />
107
108             <ImageView
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" />
114
115             <TextView
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" />
123         </LinearLayout>
124
125         <!-- Custom icon. -->
126         <LinearLayout
127             android:id="@+id/custom_icon_linearlayout"
128             android:layout_height="wrap_content"
129             android:layout_width="match_parent"
130             android:orientation="horizontal"
131             android:layout_marginTop="6dp" >
132
133             <RadioButton
134                 android:id="@+id/custom_icon_radiobutton"
135                 android:layout_height="wrap_content"
136                 android:layout_width="wrap_content"
137                 android:layout_gravity="center_vertical" />
138
139             <ImageView
140                 android:id="@+id/custom_icon_imageview"
141                 android:layout_width="30dp"
142                 android:layout_height="30dp"
143                 android:layout_gravity="center_vertical"
144                 tools:ignore="ContentDescription" />
145
146             <TextView
147                 android:layout_height="wrap_content"
148                 android:layout_width="wrap_content"
149                 android:layout_marginStart="7dp"
150                 android:layout_gravity="center_vertical"
151                 android:text="@string/custom_bookmark_icon"
152                 android:textSize="18sp"
153                 android:textColor="?android:textColorPrimary" />
154         </LinearLayout>
155
156         <!-- Browse button. -->
157         <Button
158             android:id="@+id/browse_button"
159             android:layout_height="wrap_content"
160             android:layout_width="wrap_content"
161             android:layout_gravity="center_horizontal"
162             android:text="@string/browse"
163             android:layout_marginBottom="12dp" />
164
165         <!-- Bookmark name.  The text input layout makes the `android:hint` float above the edit text. -->
166         <com.google.android.material.textfield.TextInputLayout
167             android:layout_height="wrap_content"
168             android:layout_width="match_parent"
169             android:layout_marginTop="6dp"
170             android:layout_marginBottom="6dp"
171             android:layout_marginStart="4dp"
172             android:layout_marginEnd="4dp" >
173
174             <!-- `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. -->
175             <com.google.android.material.textfield.TextInputEditText
176                 android:id="@+id/bookmark_name_edittext"
177                 android:layout_height="wrap_content"
178                 android:layout_width="match_parent"
179                 android:hint="@string/bookmark_name"
180                 android:imeOptions="actionGo"
181                 android:inputType="textUri"
182                 android:selectAllOnFocus="true" />
183         </com.google.android.material.textfield.TextInputLayout>
184
185         <!-- URL.  The text input layout makes the `android:hint` float above the edit text. -->
186         <com.google.android.material.textfield.TextInputLayout
187             android:layout_height="wrap_content"
188             android:layout_width="match_parent"
189             android:layout_marginTop="6dp"
190             android:layout_marginBottom="6dp"
191             android:layout_marginStart="4dp"
192             android:layout_marginEnd="4dp" >
193
194             <!-- `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. -->
195             <com.google.android.material.textfield.TextInputEditText
196                 android:id="@+id/bookmark_url_edittext"
197                 android:layout_height="wrap_content"
198                 android:layout_width="match_parent"
199                 android:hint="@string/bookmark_url"
200                 android:imeOptions="actionGo"
201                 android:inputType="textUri"
202                 android:selectAllOnFocus="true" />
203         </com.google.android.material.textfield.TextInputLayout>
204
205         <!-- Folder. -->
206         <LinearLayout
207             android:layout_height="wrap_content"
208             android:layout_width="match_parent"
209             android:orientation="horizontal"
210             android:layout_marginTop="6dp"
211             android:layout_marginStart="7dp"
212             android:layout_marginEnd="7dp" >
213
214             <TextView
215                 android:layout_height="wrap_content"
216                 android:layout_width="wrap_content"
217                 android:text="@string/folder"
218                 android:textSize="18sp"
219                 android:textColor="?android:textColorPrimary" />
220
221             <Spinner
222                 android:id="@+id/bookmark_folder_spinner"
223                 android:layout_height="wrap_content"
224                 android:layout_width="wrap_content" />
225         </LinearLayout>
226
227         <!-- Display order. -->
228         <LinearLayout
229             android:layout_height="match_parent"
230             android:layout_width="match_parent"
231             android:orientation="horizontal"
232             android:layout_marginTop="6dp"
233             android:layout_marginBottom="6dp"
234             android:layout_marginStart="7dp"
235             android:layout_marginEnd="7dp" >
236
237             <TextView
238                 android:layout_height="wrap_content"
239                 android:layout_width="wrap_content"
240                 android:text="@string/display_order"
241                 android:textSize="18sp"
242                 android:textColor="?android:textColorPrimary"
243                 android:layout_marginEnd="6dp"
244                 android:labelFor="@+id/bookmark_display_order_edittext"/>
245
246             <EditText
247                 android:id="@id/bookmark_display_order_edittext"
248                 android:layout_height="wrap_content"
249                 android:layout_width="match_parent"
250                 android:imeOptions="actionGo"
251                 android:inputType="number"
252                 android:selectAllOnFocus="true"
253                 android:importantForAutofill="no" />
254         </LinearLayout>
255     </LinearLayout>
256 </ScrollView>