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