]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/edit_bookmark_dialog.xml
Add the ability to edit bookmarks.
[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     android:layout_width="match_parent"
24     android:layout_height="match_parent"
25     android:orientation="vertical"
26     android:paddingStart="4dp"
27     android:paddingEnd="4dp" >
28
29     <LinearLayout
30         android:layout_height="wrap_content"
31         android:layout_width="match_parent"
32         android:orientation="horizontal"
33         android:paddingTop="12dp"
34         android:paddingBottom="4dp"
35         android:paddingStart="20dp"
36         android:paddingEnd="0dp" >
37
38         <ImageView
39             android:id="@+id/edit_bookmark_new_favorite_icon"
40             android:layout_width="32dp"
41             android:layout_height="32dp"
42             android:contentDescription="@string/new_favorite_icon" />
43
44         <TextView
45             android:layout_height="wrap_content"
46             android:layout_width="wrap_content"
47             android:text="@string/use_new_icon"
48             android:textColor="@color/black"
49             android:textSize="20sp"
50             android:paddingStart="8dp"
51             android:paddingEnd="4dp" />
52
53         <CheckBox
54             android:id="@+id/edit_bookmark_use_new_favorite_icon_checkbox"
55             android:layout_height="wrap_content"
56             android:layout_width="wrap_content" />
57     </LinearLayout>
58
59     <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
60     <android.support.design.widget.TextInputLayout
61         android:layout_height="wrap_content"
62         android:layout_width="match_parent"
63         android:layout_marginTop="12dp"
64         android:layout_marginBottom="6dp" >
65
66         <!-- `android:imeOptions="actionGo"` sets the keyboard to have a "go" key instead of a "new line" key.
67             `android:inputType="textUri"` disables spell check in the EditText.
68             `android:singleLine="true"` is not needed in a Dialog.-->
69         <android.support.design.widget.TextInputEditText
70             android:id="@+id/edit_bookmark_name_edittext"
71             android:layout_height="wrap_content"
72             android:layout_width="match_parent"
73             android:hint="@string/bookmark_name"
74             android:imeOptions="actionGo"
75             android:inputType="textUri" />
76     </android.support.design.widget.TextInputLayout>
77
78     <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
79     <android.support.design.widget.TextInputLayout
80         android:layout_height="wrap_content"
81         android:layout_width="match_parent"
82         android:layout_marginTop="6dp"
83         android:layout_marginBottom="12dp" >
84
85         <!-- `android:imeOptions="actionGo"` sets the keyboard to have a "go" key instead of a "new line" key.
86             `android:inputType="textUri"` disables spell check in the EditText.
87             `android:singleLine="true"` is not needed in a Dialog.-->
88         <EditText
89             android:id="@+id/edit_bookmark_url_edittext"
90             android:layout_height="wrap_content"
91             android:layout_width="match_parent"
92             android:hint="@string/bookmark_url"
93             android:imeOptions="actionGo"
94             android:inputType="textUri" />
95     </android.support.design.widget.TextInputLayout>
96 </LinearLayout>