]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/create_bookmark_folder_dialog.xml
53bf6dcf2a96572d151ab1bf4a70a9c3298db1f4
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / create_bookmark_folder_dialog.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2016-2018 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     <LinearLayout
28         android:layout_height="wrap_content"
29         android:layout_width="match_parent"
30         android:orientation="vertical" >
31
32         <!-- The icon selection rows. -->
33         <LinearLayout
34             android:layout_height="wrap_content"
35             android:layout_width="match_parent"
36             android:orientation="horizontal">
37
38             <!-- The column displaying the icons. -->
39             <LinearLayout
40                 android:layout_height="wrap_content"
41                 android:layout_width="wrap_content"
42                 android:orientation="vertical" >
43
44                 <ImageView
45                     android:id="@+id/create_folder_default_icon"
46                     android:layout_height="30dp"
47                     android:layout_width="30dp"
48                     android:layout_marginTop="12dp"
49                     android:layout_marginBottom="6dp"
50                     android:layout_marginStart="8dp"
51                     android:layout_marginEnd="8dp"
52                     android:layout_gravity="center_vertical"
53                     android:src="@drawable/folder_blue_bitmap"
54                     tools:ignore="ContentDescription" />
55
56                 <ImageView
57                     android:id="@+id/create_folder_web_page_icon"
58                     android:layout_height="30dp"
59                     android:layout_width="30dp"
60                     android:layout_marginTop="6dp"
61                     android:layout_marginBottom="6dp"
62                     android:layout_marginStart="8dp"
63                     android:layout_marginEnd="8dp"
64                     android:layout_gravity="center_vertical"
65                     tools:ignore="ContentDescription" />
66             </LinearLayout>
67
68             <!-- The column with the `RadioGroup`. -->
69             <RadioGroup
70                 android:id="@+id/create_folder_radiogroup"
71                 android:layout_width="match_parent"
72                 android:layout_height="wrap_content"
73                 android:checkedButton="@+id/create_folder_default_icon_radiobutton">
74
75                 <RadioButton
76                     android:id="@id/create_folder_default_icon_radiobutton"
77                     android:layout_width="wrap_content"
78                     android:layout_height="wrap_content"
79                     android:layout_marginTop="12dp"
80                     android:layout_marginBottom="9dp"
81                     android:text="@string/default_folder_icon"
82                     android:textSize="18sp" />
83
84                 <RadioButton
85                     android:id="@+id/create_folder_web_page_icon_radiobutton"
86                     android:layout_width="wrap_content"
87                     android:layout_height="wrap_content"
88                     android:text="@string/web_page_favorite_icon"
89                     android:textSize="18sp" />
90             </RadioGroup>
91         </LinearLayout>
92
93         <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
94         <android.support.design.widget.TextInputLayout
95             android:layout_height="wrap_content"
96             android:layout_width="match_parent"
97             android:layout_marginTop="6dp"
98             android:layout_marginStart="4dp"
99             android:layout_marginEnd="4dp" >
100
101             <!-- `android:imeOptions="actionGo"` sets the keyboard to have a "go" key instead of a "new line" key.
102                 `android:inputType="textUri"` disables spell check in the EditText. -->
103             <android.support.design.widget.TextInputEditText
104                 android:id="@+id/create_folder_name_edittext"
105                 android:layout_height="wrap_content"
106                 android:layout_width="match_parent"
107                 android:hint="@string/folder_name"
108                 android:imeOptions="actionGo"
109                 android:inputType="textUri" />
110         </android.support.design.widget.TextInputLayout>
111
112         <TextView
113             android:layout_height="wrap_content"
114             android:layout_width="match_parent"
115             android:gravity="center_horizontal"
116             android:text="@string/folder_names_must_be_unique" />
117     </LinearLayout>
118 </ScrollView>