]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_databaseview_dialog.xml
Create an adaptive icon. https://redmine.stoutner.com/issues/265
[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-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_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         <!-- 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_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" />
81
82                 <ImageView
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" />
90             </LinearLayout>
91
92             <!-- The column with the `RadioGroup`. -->
93             <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" >
98
99                 <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" />
108
109                 <RadioButton
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" />
117             </RadioGroup>
118         </LinearLayout>
119
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" >
128
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>
139
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" >
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             <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>
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/folder"
173                 android:textSize="18sp"
174                 android:textColor="?android:textColorPrimary" />
175
176             <Spinner
177                 android:id="@+id/edit_bookmark_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_marginBottom="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_bookmark_display_order_edittext"/>
200
201             <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" />
208         </LinearLayout>
209     </LinearLayout>
210 </ScrollView>