]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_folder_databaseview_dialog.xml
6ea35eeba0fddbd1ee46e26812147702bcff1b59
[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-2017 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     android:layout_height="wrap_content"
24     android:layout_width="match_parent" >
25
26     <!-- Setting `android:focusable` and `android:focusableInTouchMode` prevent `edit_bookmark_display_order_edittext` from being autoselected. -->
27     <LinearLayout
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" >
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/edit_folder_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         <!-- The icon selection rows. -->
61         <LinearLayout
62             android:layout_height="wrap_content"
63             android:layout_width="match_parent"
64             android:orientation="horizontal" >
65
66             <!-- The column displaying the icons. -->
67             <LinearLayout
68                 android:layout_height="wrap_content"
69                 android:layout_width="wrap_content"
70                 android:orientation="vertical"
71                 android:layout_marginStart="7dp" >
72
73                 <ImageView
74                     android:id="@+id/edit_folder_current_icon_imageview"
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" />
81
82                 <ImageView
83                     android:id="@+id/edit_folder_default_icon_imageview"
84                     android:layout_height="30dp"
85                     android:layout_width="30dp"
86                     android:layout_marginTop="6dp"
87                     android:layout_marginBottom="6dp"
88                     android:layout_gravity="center_vertical"
89                     android:src="@drawable/folder_blue_bitmap"
90                     tools:ignore="ContentDescription" />
91
92                 <ImageView
93                     android:id="@+id/edit_folder_webpage_favorite_icon_imageview"
94                     android:layout_width="30dp"
95                     android:layout_height="30dp"
96                     android:layout_marginTop="6dp"
97                     android:layout_marginBottom="6dp"
98                     android:layout_gravity="center_vertical"
99                     tools:ignore="ContentDescription" />
100             </LinearLayout>
101
102             <!-- The column with the `RadioGroup`. -->
103             <RadioGroup
104                 android:id="@+id/edit_folder_icon_radiogroup"
105                 android:layout_height="wrap_content"
106                 android:layout_width="match_parent"
107                 android:checkedButton="@+id/edit_folder_current_icon_radiobutton" >
108
109                 <RadioButton
110                     android:id="@id/edit_folder_current_icon_radiobutton"
111                     android:layout_height="wrap_content"
112                     android:layout_width="wrap_content"
113                     android:layout_marginTop="6dp"
114                     android:layout_marginBottom="4dp"
115                     android:text="@string/current_bookmark_icon"
116                     android:textSize="18sp"
117                     android:textColor="?android:textColorPrimary" />
118
119                 <RadioButton
120                     android:id="@+id/edit_folder_default_icon_radiobutton"
121                     android:layout_width="wrap_content"
122                     android:layout_height="wrap_content"
123                     android:layout_marginTop="5dp"
124                     android:layout_marginBottom="4dp"
125                     android:text="@string/default_folder_icon"
126                     android:textSize="18sp"
127                     android:textColor="?android:textColorPrimary" />
128
129                 <RadioButton
130                     android:id="@+id/edit_folder_webpage_favorite_icon_radiobutton"
131                     android:layout_height="wrap_content"
132                     android:layout_width="wrap_content"
133                     android:layout_marginTop="5dp"
134                     android:text="@string/web_page_favorite_icon"
135                     android:textSize="18sp"
136                     android:textColor="?android:textColorPrimary" />
137             </RadioGroup>
138         </LinearLayout>
139
140         <!-- Folder name.  `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="12dp"
145             android:layout_marginBottom="6dp"
146             android:layout_marginStart="4dp"
147             android:layout_marginEnd="4dp" >
148
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`. -->
150             <android.support.design.widget.TextInputEditText
151                 android:id="@+id/edit_folder_name_edittext"
152                 android:layout_height="wrap_content"
153                 android:layout_width="match_parent"
154                 android:hint="@string/folder_name"
155                 android:imeOptions="actionGo"
156                 android:inputType="textUri"
157                 android:selectAllOnFocus="true" />
158         </android.support.design.widget.TextInputLayout>
159
160         <!-- Folder. -->
161         <LinearLayout
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" >
168
169             <TextView
170                 android:layout_height="wrap_content"
171                 android:layout_width="wrap_content"
172                 android:text="@string/parent_folder"
173                 android:textSize="18sp"
174                 android:textColor="?android:textColorPrimary" />
175
176             <Spinner
177                 android:id="@+id/edit_folder_parent_folder_spinner"
178                 android:layout_height="wrap_content"
179                 android:layout_width="wrap_content" />
180         </LinearLayout>
181
182         <!-- Display order. -->
183         <LinearLayout
184             android:layout_height="match_parent"
185             android:layout_width="match_parent"
186             android:orientation="horizontal"
187             android:layout_marginTop="6dp"
188             android:layout_marginStart="7dp"
189             android:layout_marginEnd="7dp" >
190
191             <TextView
192                 android:layout_height="wrap_content"
193                 android:layout_width="wrap_content"
194                 android:text="@string/display_order"
195                 android:textSize="18sp"
196                 android:textColor="?android:textColorPrimary"
197                 android:layout_marginEnd="6dp"
198                 android:labelFor="@+id/edit_folder_display_order_edittext"/>
199
200             <EditText
201                 android:id="@id/edit_folder_display_order_edittext"
202                 android:layout_height="wrap_content"
203                 android:layout_width="match_parent"
204                 android:imeOptions="actionGo"
205                 android:inputType="number"
206                 android:selectAllOnFocus="true" />
207         </LinearLayout>
208
209         <TextView
210             android:layout_height="wrap_content"
211             android:layout_width="match_parent"
212             android:gravity="center_horizontal"
213             android:text="@string/folder_names_must_be_unique" />
214     </LinearLayout>
215 </ScrollView>