]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_folder_databaseview_dialog.xml
Migrate to AndroidX from the Android Support Library. https://redmine.stoutner.com...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / edit_bookmark_folder_databaseview_dialog.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
7
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.
12
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.
17
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/>. -->
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` prevent `edit_bookmark_display_order_edittext` from being autoselected. -->
28     <LinearLayout
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" >
35
36         <!-- Database ID. -->
37         <LinearLayout
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" >
44
45             <TextView
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" />
52
53             <TextView
54                 android:id="@+id/edit_folder_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" />
59         </LinearLayout>
60
61         <!-- The icon selection rows. -->
62         <LinearLayout
63             android:layout_height="wrap_content"
64             android:layout_width="match_parent"
65             android:orientation="horizontal" >
66
67             <!-- The column displaying the icons. -->
68             <LinearLayout
69                 android:layout_height="wrap_content"
70                 android:layout_width="wrap_content"
71                 android:orientation="vertical"
72                 android:layout_marginStart="7dp" >
73
74                 <ImageView
75                     android:id="@+id/edit_folder_current_icon_imageview"
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" />
82
83                 <ImageView
84                     android:id="@+id/edit_folder_default_icon_imageview"
85                     android:layout_height="30dp"
86                     android:layout_width="30dp"
87                     android:layout_marginTop="6dp"
88                     android:layout_marginBottom="6dp"
89                     android:layout_gravity="center_vertical"
90                     android:src="@drawable/folder_blue_bitmap"
91                     tools:ignore="ContentDescription" />
92
93                 <ImageView
94                     android:id="@+id/edit_folder_webpage_favorite_icon_imageview"
95                     android:layout_width="30dp"
96                     android:layout_height="30dp"
97                     android:layout_marginTop="6dp"
98                     android:layout_marginBottom="6dp"
99                     android:layout_gravity="center_vertical"
100                     tools:ignore="ContentDescription" />
101             </LinearLayout>
102
103             <!-- The column with the `RadioGroup`. -->
104             <RadioGroup
105                 android:id="@+id/edit_folder_icon_radiogroup"
106                 android:layout_height="wrap_content"
107                 android:layout_width="match_parent"
108                 android:checkedButton="@+id/edit_folder_current_icon_radiobutton" >
109
110                 <RadioButton
111                     android:id="@id/edit_folder_current_icon_radiobutton"
112                     android:layout_height="wrap_content"
113                     android:layout_width="wrap_content"
114                     android:layout_marginTop="6dp"
115                     android:layout_marginBottom="4dp"
116                     android:text="@string/current_bookmark_icon"
117                     android:textSize="18sp"
118                     android:textColor="?android:textColorPrimary" />
119
120                 <RadioButton
121                     android:id="@+id/edit_folder_default_icon_radiobutton"
122                     android:layout_width="wrap_content"
123                     android:layout_height="wrap_content"
124                     android:layout_marginTop="5dp"
125                     android:layout_marginBottom="4dp"
126                     android:text="@string/default_folder_icon"
127                     android:textSize="18sp"
128                     android:textColor="?android:textColorPrimary" />
129
130                 <RadioButton
131                     android:id="@+id/edit_folder_webpage_favorite_icon_radiobutton"
132                     android:layout_height="wrap_content"
133                     android:layout_width="wrap_content"
134                     android:layout_marginTop="5dp"
135                     android:text="@string/web_page_favorite_icon"
136                     android:textSize="18sp"
137                     android:textColor="?android:textColorPrimary" />
138             </RadioGroup>
139         </LinearLayout>
140
141         <!-- Folder name.  The `TextInputLayout` makes the `android:hint` float above the `EditText`. -->
142         <com.google.android.material.textfield.TextInputLayout
143             android:layout_height="wrap_content"
144             android:layout_width="match_parent"
145             android:layout_marginTop="12dp"
146             android:layout_marginBottom="6dp"
147             android:layout_marginStart="4dp"
148             android:layout_marginEnd="4dp" >
149
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             <com.google.android.material.textfield.TextInputEditText
152                 android:id="@+id/edit_folder_name_edittext"
153                 android:layout_height="wrap_content"
154                 android:layout_width="match_parent"
155                 android:hint="@string/folder_name"
156                 android:imeOptions="actionGo"
157                 android:inputType="textUri"
158                 android:selectAllOnFocus="true" />
159         </com.google.android.material.textfield.TextInputLayout>
160
161         <!-- Folder. -->
162         <LinearLayout
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" >
169
170             <TextView
171                 android:layout_height="wrap_content"
172                 android:layout_width="wrap_content"
173                 android:text="@string/parent_folder"
174                 android:textSize="18sp"
175                 android:textColor="?android:textColorPrimary" />
176
177             <Spinner
178                 android:id="@+id/edit_folder_parent_folder_spinner"
179                 android:layout_height="wrap_content"
180                 android:layout_width="wrap_content" />
181         </LinearLayout>
182
183         <!-- Display order. -->
184         <LinearLayout
185             android:layout_height="match_parent"
186             android:layout_width="match_parent"
187             android:orientation="horizontal"
188             android:layout_marginTop="6dp"
189             android:layout_marginStart="7dp"
190             android:layout_marginEnd="7dp" >
191
192             <TextView
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_folder_display_order_edittext"/>
200
201             <EditText
202                 android:id="@id/edit_folder_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"
208                 android:importantForAutofill="no"
209                 tools:targetApi="26" />
210         </LinearLayout>
211
212         <TextView
213             android:layout_height="wrap_content"
214             android:layout_width="match_parent"
215             android:gravity="center_horizontal"
216             android:text="@string/folder_names_must_be_unique" />
217     </LinearLayout>
218 </ScrollView>