]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout-w900dp/bookmarks_drawer.xml
e49aaf9cca0d3548fb594bf7c49a1e2ad15d2b72
[PrivacyBrowserAndroid.git] / app / src / main / res / layout-w900dp / bookmarks_drawer.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 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 <!-- `android:layout_width="400dp"` keeps the bookmarks drawer from filling the whole screen on a tablet. -->
22 <FrameLayout
23     android:id="@+id/bookmarks_framelayout"
24     xmlns:android="http://schemas.android.com/apk/res/android"
25     xmlns:app="http://schemas.android.com/apk/res-auto"
26     xmlns:tools="http://schemas.android.com/tools"
27     android:layout_height="match_parent"
28     android:layout_width="400dp"
29     android:layout_gravity="end" >
30
31     <LinearLayout
32         android:layout_height="match_parent"
33         android:layout_width="match_parent"
34         android:orientation="vertical"
35         android:background="?android:attr/colorBackground" >
36
37         <!-- A compound drawable doesn't work well because only the image view should execute the `onClick()`. -->
38         <LinearLayout
39             android:layout_height="wrap_content"
40             android:layout_width="match_parent"
41             android:orientation="horizontal"
42             tools:ignore="UseCompoundDrawables" >
43
44             <ImageView
45                 android:layout_height="match_parent"
46                 android:layout_width="wrap_content"
47                 android:layout_gravity="center_vertical"
48                 android:paddingStart="15dp"
49                 android:paddingEnd="15dp"
50                 android:src="@drawable/back"
51                 android:background="?attr/selectableItemBackground"
52                 android:onClick="bookmarksBack"
53                 android:contentDescription="@string/back"
54                 app:tint="?android:attr/textColorPrimary" />
55
56             <TextView
57                 android:id="@+id/bookmarks_title_textview"
58                 android:layout_height="wrap_content"
59                 android:layout_width="match_parent"
60                 android:textStyle="bold"
61                 android:textSize="20sp"
62                 android:textColor="?android:attr/textColorPrimary"
63                 android:layout_margin="10dp" />
64         </LinearLayout>
65
66         <ListView
67             android:id="@+id/bookmarks_drawer_listview"
68             android:layout_height="0dp"
69             android:layout_width="match_parent"
70             android:layout_weight="1"
71             android:divider="@color/transparent"
72             android:dividerHeight="0dp" />
73     </LinearLayout>
74
75     <com.google.android.material.floatingactionbutton.FloatingActionButton
76         android:id="@+id/launch_bookmarks_activity_fab"
77         android:layout_height="wrap_content"
78         android:layout_width="wrap_content"
79         android:layout_gravity="bottom|end"
80         android:layout_marginEnd="16dp"
81         android:layout_marginBottom="155dp"
82         android:src="@drawable/bookmarks"
83         android:tint="?attr/fabIconTintColor" />
84
85     <com.google.android.material.floatingactionbutton.FloatingActionButton
86         android:id="@+id/create_bookmark_folder_fab"
87         android:layout_height="wrap_content"
88         android:layout_width="wrap_content"
89         android:layout_gravity="bottom|end"
90         android:layout_marginEnd="16dp"
91         android:layout_marginBottom="85dp"
92         android:src="@drawable/create_folder"
93         android:tint="?attr/fabIconTintColor" />
94
95     <com.google.android.material.floatingactionbutton.FloatingActionButton
96         android:id="@+id/create_bookmark_fab"
97         android:layout_height="wrap_content"
98         android:layout_width="wrap_content"
99         android:layout_gravity="bottom|end"
100         android:layout_margin="16dp"
101         android:src="@drawable/create_bookmark"
102         android:tint="?attr/fabIconTintColor" />
103 </FrameLayout>