]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_dialog.xml
Release 1.9.1.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / edit_bookmark_dialog.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright 2016 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 <LinearLayout
22     xmlns:android="http://schemas.android.com/apk/res/android"
23     xmlns:tools="http://schemas.android.com/tools"
24     android:layout_width="match_parent"
25     android:layout_height="match_parent"
26     android:orientation="vertical">
27
28     <!-- The icon selection rows. -->
29     <LinearLayout
30         android:layout_height="wrap_content"
31         android:layout_width="match_parent"
32         android:orientation="horizontal">
33
34         <!-- The column displaying the icons. -->
35         <LinearLayout
36             android:layout_height="wrap_content"
37             android:layout_width="wrap_content"
38             android:layout_marginStart="16dp"
39             android:layout_marginEnd="10dp"
40             android:orientation="vertical" >
41
42             <ImageView
43                 android:id="@+id/edit_bookmark_current_icon"
44                 android:layout_width="30dp"
45                 android:layout_height="30dp"
46                 android:layout_marginTop="12dp"
47                 android:layout_marginBottom="6dp"
48                 android:layout_gravity="center_vertical"
49                 tools:ignore="ContentDescription" />
50
51             <ImageView
52                 android:id="@+id/edit_bookmark_web_page_favorite_icon"
53                 android:layout_width="30dp"
54                 android:layout_height="30dp"
55                 android:layout_marginTop="6dp"
56                 android:layout_marginBottom="6dp"
57                 tools:ignore="ContentDescription" />
58         </LinearLayout>
59
60         <!-- The column with the `RadioGroup`. -->
61         <RadioGroup
62             android:layout_height="wrap_content"
63             android:layout_width="match_parent"
64             android:checkedButton="@+id/edit_bookmark_current_icon_radiobutton" >
65
66             <RadioButton
67                 android:id="@id/edit_bookmark_current_icon_radiobutton"
68                 android:layout_height="wrap_content"
69                 android:layout_width="wrap_content"
70                 android:layout_marginTop="12dp"
71                 android:layout_marginBottom="4dp"
72                 android:text="@string/current_bookmark_icon"
73                 android:textSize="18sp" />
74
75             <RadioButton
76                 android:id="@+id/edit_bookmark_web_page_favorite_icon_radiobutton"
77                 android:layout_height="wrap_content"
78                 android:layout_width="wrap_content"
79                 android:layout_marginTop="5dp"
80                 android:text="@string/web_page_favorite_icon"
81                 android:textSize="18sp" />
82         </RadioGroup>
83     </LinearLayout>
84
85     <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
86     <android.support.design.widget.TextInputLayout
87         android:layout_height="wrap_content"
88         android:layout_width="match_parent"
89         android:layout_marginTop="12dp"
90         android:layout_marginBottom="6dp"
91         android:layout_marginStart="4dp"
92         android:layout_marginEnd="4dp" >
93
94         <!-- `android:imeOptions="actionGo"` sets the keyboard to have a "go" key instead of a "new line" key.
95             `android:inputType="textUri"` disables spell check in the EditText.
96             `android:singleLine="true"` is not needed in a Dialog.-->
97         <android.support.design.widget.TextInputEditText
98             android:id="@+id/edit_bookmark_name_edittext"
99             android:layout_height="wrap_content"
100             android:layout_width="match_parent"
101             android:hint="@string/bookmark_name"
102             android:imeOptions="actionGo"
103             android:inputType="textUri" />
104     </android.support.design.widget.TextInputLayout>
105
106     <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
107     <android.support.design.widget.TextInputLayout
108         android:layout_height="wrap_content"
109         android:layout_width="match_parent"
110         android:layout_marginTop="6dp"
111         android:layout_marginBottom="12dp"
112         android:layout_marginStart="4dp"
113         android:layout_marginEnd="4dp" >
114
115         <!-- `android:imeOptions="actionGo"` sets the keyboard to have a "go" key instead of a "new line" key.
116             `android:inputType="textUri"` disables spell check in the EditText.
117             `android:singleLine="true"` is not needed in a Dialog.-->
118         <EditText
119             android:id="@+id/edit_bookmark_url_edittext"
120             android:layout_height="wrap_content"
121             android:layout_width="match_parent"
122             android:hint="@string/bookmark_url"
123             android:imeOptions="actionGo"
124             android:inputType="textUri" />
125     </android.support.design.widget.TextInputLayout>
126 </LinearLayout>