]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/logcat_bottom_appbar.xml
First wrong button text in View Headers in night theme. https://redmine.stoutner...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / logcat_bottom_appbar.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright 2018-2024 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android/>.
7
8   Privacy Browser Android 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 Android 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 Android.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <androidx.coordinatorlayout.widget.CoordinatorLayout
22     xmlns:android="http://schemas.android.com/apk/res/android"
23     xmlns:app="http://schemas.android.com/apk/res-auto"
24     xmlns:tools="http://schemas.android.com/tools"
25     android:layout_height="match_parent"
26     android:layout_width="match_parent" >
27
28     <!-- The linear layout with `orientation="vertical"` keeps the content above the app bar layout.  `app:layout_dodgeInsetEdges="bottom"` as a child of a coordinator layout moves the view above snackbars. -->
29     <LinearLayout
30         android:layout_height="match_parent"
31         android:layout_width="match_parent"
32         android:orientation="vertical"
33         app:layout_dodgeInsetEdges="bottom" >
34
35         <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
36             android:id="@+id/swiperefreshlayout"
37             android:layout_height="0dp"
38             android:layout_width="match_parent"
39             android:layout_weight="1" >
40
41             <WebView
42                 android:id="@+id/logcat_webview"
43                 android:layout_height="wrap_content"
44                 android:layout_width="match_parent" />
45         </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
46
47         <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
48         <com.google.android.material.appbar.AppBarLayout
49             android:layout_height="wrap_content"
50             android:layout_width="match_parent"
51             android:background="?android:attr/colorBackground"
52             android:theme="@style/PrivacyBrowserAppBar" >
53
54             <androidx.appcompat.widget.Toolbar
55                 android:id="@+id/toolbar"
56                 android:layout_height="wrap_content"
57                 android:layout_width="match_parent" />
58
59             <!-- The search linear layout.  It is initially `visibility="gone"` and is only displayed when requested. -->
60             <LinearLayout
61                 android:id="@+id/search_linearlayout"
62                 android:layout_height="wrap_content"
63                 android:layout_width="match_parent"
64                 android:orientation="horizontal"
65                 android:visibility="gone" >
66
67                 <!-- `android:imeOptions="actionDone"` sets the keyboard to have a `check mark` key instead of a `new line` key. -->
68                 <EditText
69                     android:id="@+id/search_edittext"
70                     android:layout_height="wrap_content"
71                     android:layout_width="0dp"
72                     android:layout_weight="1"
73                     android:layout_marginStart="8dp"
74                     android:layout_marginEnd="4dp"
75                     android:hint="@string/search"
76                     android:lines="1"
77                     android:imeOptions="actionDone"
78                     android:inputType="text"
79                     tools:ignore="Autofill" />
80
81                 <TextView
82                     android:id="@+id/search_count_textview"
83                     android:layout_height="wrap_content"
84                     android:layout_width="wrap_content"
85                     android:layout_marginStart="4dp"
86                     android:layout_marginEnd="4dp"
87                     android:text="@string/zero_of_zero" />
88
89                 <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
90                 <ImageView
91                     android:id="@+id/search_previous"
92                     android:layout_height="35dp"
93                     android:layout_width="35dp"
94                     android:layout_marginStart="4dp"
95                     android:layout_marginEnd="4dp"
96                     android:layout_gravity="center_vertical"
97                     android:src="@drawable/previous"
98                     android:background="?attr/selectableItemBackground"
99                     android:contentDescription="@string/previous"
100                     android:onClick="searchPrevious"
101                     app:tint="@color/blue_icon" />
102
103                 <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
104                 <ImageView
105                     android:id="@+id/search_next"
106                     android:layout_height="35dp"
107                     android:layout_width="35dp"
108                     android:layout_marginStart="4dp"
109                     android:layout_marginEnd="4dp"
110                     android:layout_gravity="center_vertical"
111                     android:src="@drawable/next"
112                     android:background="?attr/selectableItemBackground"
113                     android:contentDescription="@string/next"
114                     android:onClick="searchNext"
115                     app:tint="@color/blue_icon" />
116
117                 <!-- `android:background="?attr/selectableItemBackground"` adds a ripple animation on touch. -->
118                 <ImageView
119                     android:id="@+id/close_search"
120                     android:layout_height="35dp"
121                     android:layout_width="35dp"
122                     android:layout_marginStart="4dp"
123                     android:layout_marginEnd="8dp"
124                     android:layout_gravity="center_vertical"
125                     android:src="@drawable/close"
126                     android:background="?attr/selectableItemBackground"
127                     android:contentDescription="@string/close"
128                     android:onClick="closeSearch"
129                     app:tint="@color/blue_icon" />
130             </LinearLayout>
131         </com.google.android.material.appbar.AppBarLayout>
132     </LinearLayout>
133 </androidx.coordinatorlayout.widget.CoordinatorLayout>