]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_dialog.xml
1184805eda9cc66ac6dd575ef65fcb1565eb7a9c
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / edit_bookmark_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:tools="http://schemas.android.com/tools"
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_bookmark_current_icon"
47                     android:layout_width="30dp"
48                     android:layout_height="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_bookmark_webpage_favorite_icon"
56                     android:layout_width="30dp"
57                     android:layout_height="30dp"
58                     android:layout_marginTop="6dp"
59                     android:layout_marginBottom="6dp"
60                     tools:ignore="ContentDescription" />
61             </LinearLayout>
62
63             <!-- The column with the `RadioGroup`. -->
64             <RadioGroup
65                 android:id="@+id/edit_bookmark_icon_radiogroup"
66                 android:layout_height="wrap_content"
67                 android:layout_width="match_parent"
68                 android:checkedButton="@+id/edit_bookmark_current_icon_radiobutton" >
69
70                 <RadioButton
71                     android:id="@id/edit_bookmark_current_icon_radiobutton"
72                     android:layout_height="wrap_content"
73                     android:layout_width="wrap_content"
74                     android:layout_marginTop="12dp"
75                     android:layout_marginBottom="4dp"
76                     android:text="@string/current_bookmark_icon"
77                     android:textSize="18sp"
78                     android:textColor="?android:textColorPrimary" />
79
80                 <RadioButton
81                     android:id="@+id/edit_bookmark_webpage_favorite_icon_radiobutton"
82                     android:layout_height="wrap_content"
83                     android:layout_width="wrap_content"
84                     android:layout_marginTop="5dp"
85                     android:text="@string/web_page_favorite_icon"
86                     android:textSize="18sp"
87                     android:textColor="?android:textColorPrimary" />
88             </RadioGroup>
89         </LinearLayout>
90
91         <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
92         <android.support.design.widget.TextInputLayout
93             android:layout_height="wrap_content"
94             android:layout_width="match_parent"
95             android:layout_marginTop="12dp"
96             android:layout_marginBottom="6dp"
97             android:layout_marginStart="4dp"
98             android:layout_marginEnd="4dp" >
99
100             <!-- `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`. -->
101             <android.support.design.widget.TextInputEditText
102                 android:id="@+id/edit_bookmark_name_edittext"
103                 android:layout_height="wrap_content"
104                 android:layout_width="match_parent"
105                 android:hint="@string/bookmark_name"
106                 android:imeOptions="actionGo"
107                 android:inputType="textUri"
108                 android:selectAllOnFocus="true" />
109         </android.support.design.widget.TextInputLayout>
110
111         <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
112         <android.support.design.widget.TextInputLayout
113             android:layout_height="wrap_content"
114             android:layout_width="match_parent"
115             android:layout_marginTop="6dp"
116             android:layout_marginBottom="12dp"
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             <EditText
122                 android:id="@+id/edit_bookmark_url_edittext"
123                 android:layout_height="wrap_content"
124                 android:layout_width="match_parent"
125                 android:hint="@string/bookmark_url"
126                 android:imeOptions="actionGo"
127                 android:inputType="textUri"
128                 android:selectAllOnFocus="true" />
129         </android.support.design.widget.TextInputLayout>
130     </LinearLayout>
131 </ScrollView>