]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_folder_dialog.xml
Create an adaptive icon. https://redmine.stoutner.com/issues/265
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / edit_bookmark_folder_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     <LinearLayout
27         xmlns:android="http://schemas.android.com/apk/res/android"
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
33         <!-- The icon selection rows. -->
34         <LinearLayout
35             android:layout_height="wrap_content"
36             android:layout_width="match_parent"
37             android:orientation="horizontal">
38
39             <!-- The column displaying the icons. -->
40             <LinearLayout
41                 android:layout_height="wrap_content"
42                 android:layout_width="wrap_content"
43                 android:orientation="vertical"
44                 android:layout_marginStart="7dp" >
45
46                 <ImageView
47                     android:id="@+id/edit_folder_current_icon_imageview"
48                     android:layout_height="30dp"
49                     android:layout_width="30dp"
50                     android:layout_marginTop="12dp"
51                     android:layout_marginBottom="6dp"
52                     android:layout_gravity="center_vertical"
53                     tools:ignore="ContentDescription" />
54
55                 <ImageView
56                     android:id="@+id/edit_folder_default_icon_imageview"
57                     android:layout_height="30dp"
58                     android:layout_width="30dp"
59                     android:layout_marginTop="6dp"
60                     android:layout_marginBottom="6dp"
61                     android:layout_gravity="center_vertical"
62                     android:src="@drawable/folder_blue_bitmap"
63                     tools:ignore="ContentDescription" />
64
65                 <ImageView
66                     android:id="@+id/edit_folder_web_page_favorite_icon_imageview"
67                     android:layout_height="30dp"
68                     android:layout_width="30dp"
69                     android:layout_marginTop="6dp"
70                     android:layout_marginBottom="12dp"
71                     android:layout_gravity="center_vertical"
72                     tools:ignore="ContentDescription" />
73             </LinearLayout>
74
75             <!-- The column with the `RadioGroup`. -->
76             <RadioGroup
77                 android:id="@+id/edit_folder_icon_radio_group"
78                 android:layout_width="match_parent"
79                 android:layout_height="wrap_content"
80                 android:checkedButton="@+id/edit_folder_current_icon_radiobutton">
81
82                 <RadioButton
83                     android:id="@id/edit_folder_current_icon_radiobutton"
84                     android:layout_height="wrap_content"
85                     android:layout_width="wrap_content"
86                     android:layout_marginTop="12dp"
87                     android:layout_marginBottom="4dp"
88                     android:text="@string/current_folder_icon"
89                     android:textSize="18sp"
90                     android:textColor="?android:textColorPrimary" />
91
92                 <RadioButton
93                     android:id="@+id/edit_folder_default_icon_radiobutton"
94                     android:layout_width="wrap_content"
95                     android:layout_height="wrap_content"
96                     android:layout_marginTop="5dp"
97                     android:layout_marginBottom="4dp"
98                     android:text="@string/default_folder_icon"
99                     android:textSize="18sp"
100                     android:textColor="?android:textColorPrimary" />
101
102                 <RadioButton
103                     android:id="@+id/edit_folder_web_page_icon_radiobutton"
104                     android:layout_width="wrap_content"
105                     android:layout_height="wrap_content"
106                     android:layout_marginTop="5dp"
107                     android:text="@string/web_page_favorite_icon"
108                     android:textSize="18sp"
109                     android:textColor="?android:textColorPrimary" />
110             </RadioGroup>
111         </LinearLayout>
112
113         <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
114         <android.support.design.widget.TextInputLayout
115             android:layout_height="wrap_content"
116             android:layout_width="match_parent"
117             android:layout_marginTop="6dp"
118             android:layout_marginStart="4dp"
119             android:layout_marginEnd="4dp" >
120
121             <!-- `android:imeOptions="actionGo"` sets the keyboard to have a "go" key instead of a "new line" key.
122                 `android:inputType="textUri"` disables spell check in the EditText. -->
123             <android.support.design.widget.TextInputEditText
124                 android:id="@+id/edit_folder_name_edittext"
125                 android:layout_height="wrap_content"
126                 android:layout_width="match_parent"
127                 android:hint="@string/folder_name"
128                 android:imeOptions="actionGo"
129                 android:inputType="textUri"
130                 android:selectAllOnFocus="true" />
131         </android.support.design.widget.TextInputLayout>
132
133         <TextView
134             android:layout_height="wrap_content"
135             android:layout_width="match_parent"
136             android:gravity="center_horizontal"
137             android:text="@string/folder_names_must_be_unique" />
138     </LinearLayout>
139 </ScrollView>