]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_folder_dialog.xml
Migrate five dialogs to Kotlin. https://redmine.stoutner.com/issues/604
[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,2019-2020 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                 android:layout_marginStart="7dp" >
44
45                 <ImageView
46                     android:id="@+id/edit_folder_current_icon_imageview"
47                     android:layout_height="30dp"
48                     android:layout_width="30dp"
49                     android:layout_marginTop="12dp"
50                     android:layout_marginBottom="6dp"
51                     android:layout_gravity="center_vertical"
52                     tools:ignore="ContentDescription" />
53
54                 <ImageView
55                     android:id="@+id/edit_folder_default_icon_imageview"
56                     android:layout_height="30dp"
57                     android:layout_width="30dp"
58                     android:layout_marginTop="6dp"
59                     android:layout_marginBottom="6dp"
60                     android:layout_gravity="center_vertical"
61                     android:src="@drawable/folder_blue_bitmap"
62                     tools:ignore="ContentDescription" />
63
64                 <ImageView
65                     android:id="@+id/edit_folder_web_page_favorite_icon_imageview"
66                     android:layout_height="30dp"
67                     android:layout_width="30dp"
68                     android:layout_marginTop="6dp"
69                     android:layout_marginBottom="12dp"
70                     android:layout_gravity="center_vertical"
71                     tools:ignore="ContentDescription" />
72             </LinearLayout>
73
74             <!-- The column with the `RadioGroup`. -->
75             <RadioGroup
76                 android:id="@+id/edit_folder_icon_radio_group"
77                 android:layout_width="match_parent"
78                 android:layout_height="wrap_content"
79                 android:checkedButton="@+id/edit_folder_current_icon_radiobutton">
80
81                 <RadioButton
82                     android:id="@id/edit_folder_current_icon_radiobutton"
83                     android:layout_height="wrap_content"
84                     android:layout_width="wrap_content"
85                     android:layout_marginTop="12dp"
86                     android:layout_marginBottom="4dp"
87                     android:text="@string/current_folder_icon"
88                     android:textSize="18sp"
89                     android:textColor="?android:textColorPrimary" />
90
91                 <RadioButton
92                     android:id="@+id/edit_folder_default_icon_radiobutton"
93                     android:layout_width="wrap_content"
94                     android:layout_height="wrap_content"
95                     android:layout_marginTop="5dp"
96                     android:layout_marginBottom="4dp"
97                     android:text="@string/default_folder_icon"
98                     android:textSize="18sp"
99                     android:textColor="?android:textColorPrimary" />
100
101                 <RadioButton
102                     android:id="@+id/edit_folder_web_page_icon_radiobutton"
103                     android:layout_width="wrap_content"
104                     android:layout_height="wrap_content"
105                     android:layout_marginTop="5dp"
106                     android:text="@string/web_page_favorite_icon"
107                     android:textSize="18sp"
108                     android:textColor="?android:textColorPrimary" />
109             </RadioGroup>
110         </LinearLayout>
111
112         <!-- The `TextInputLayout` makes the `android:hint` float above the `EditText`. -->
113         <com.google.android.material.textfield.TextInputLayout
114             android:layout_height="wrap_content"
115             android:layout_width="match_parent"
116             android:layout_marginTop="6dp"
117             android:layout_marginStart="4dp"
118             android:layout_marginEnd="4dp" >
119
120             <!-- `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. -->
121             <com.google.android.material.textfield.TextInputEditText
122                 android:id="@+id/edit_folder_name_edittext"
123                 android:layout_height="wrap_content"
124                 android:layout_width="match_parent"
125                 android:hint="@string/folder_name"
126                 android:imeOptions="actionGo"
127                 android:inputType="textUri"
128                 android:selectAllOnFocus="true" />
129         </com.google.android.material.textfield.TextInputLayout>
130
131         <TextView
132             android:layout_height="wrap_content"
133             android:layout_width="match_parent"
134             android:gravity="center_horizontal"
135             android:text="@string/folder_names_must_be_unique" />
136     </LinearLayout>
137 </ScrollView>