]> gitweb.stoutner.com Git - PrivacyCell.git/blob - app/src/main/res/layout/privacy_cell_top_appbar.xml
Release 1.10.
[PrivacyCell.git] / app / src / main / res / layout / privacy_cell_top_appbar.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
7
8   Privacy Cell 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 Cell 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 Cell.  If not, see <http://www.gnu.org/licenses/>. -->
20
21 <androidx.drawerlayout.widget.DrawerLayout
22     xmlns:android="http://schemas.android.com/apk/res/android"
23     xmlns:tools="http://schemas.android.com/tools"
24     xmlns:app="http://schemas.android.com/apk/res-auto"
25     android:id="@+id/drawerlayout"
26     android:layout_height="match_parent"
27     android:layout_width="match_parent">
28
29     <androidx.coordinatorlayout.widget.CoordinatorLayout
30         android:layout_height="match_parent"
31         android:layout_width="match_parent" >
32
33         <!-- The linear layout with `orientation="vertical"` moves the main content below the app bar layout. -->
34         <LinearLayout
35             android:layout_height="match_parent"
36             android:layout_width="match_parent"
37             android:orientation="vertical" >
38
39             <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
40             <com.google.android.material.appbar.AppBarLayout
41                 android:layout_height="wrap_content"
42                 android:layout_width="match_parent"
43                 android:background="?android:attr/colorBackground"
44                 android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" >
45
46                 <androidx.appcompat.widget.Toolbar
47                     android:id="@+id/toolbar"
48                     android:layout_height="wrap_content"
49                     android:layout_width="match_parent" />
50             </com.google.android.material.appbar.AppBarLayout>
51
52             <!-- The main content is wrapped in a scroll view. -->
53             <ScrollView
54                 android:layout_height="match_parent"
55                 android:layout_width="match_parent" >
56
57                 <LinearLayout
58                     android:layout_height="wrap_content"
59                     android:layout_width="match_parent"
60                     android:orientation="vertical"
61                     android:padding="15dp" >
62
63                     <!-- Overall status. -->
64                     <LinearLayout
65                         android:id="@+id/overall_status_linearlayout"
66                         android:layout_height="wrap_content"
67                         android:layout_width="wrap_content"
68                         android:layout_gravity="center_horizontal"
69                         android:orientation="vertical"
70                         tools:ignore="UseCompoundDrawables" >
71
72                         <ImageView
73                             android:id="@+id/overall_status_imageview"
74                             android:layout_width="wrap_content"
75                             android:layout_height="wrap_content"
76                             android:layout_gravity="center_horizontal"
77                             tools:ignore="ContentDescription" />
78
79                         <!-- The text color primary is only displayed if the read phone state permission is not granted.
80                             The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
81                         <TextView
82                             android:id="@+id/overall_status_textview"
83                             android:layout_height="wrap_content"
84                             android:layout_width="wrap_content"
85                             android:layout_gravity="center_horizontal"
86                             android:textAlignment="center"
87                             android:layout_marginTop="10dp"
88                             android:textColor="?android:textColorPrimary"
89                             android:textSize="20sp"
90                             android:textStyle="bold"
91                             android:text="@string/not_connected" />
92                     </LinearLayout>
93
94                     <!-- Voice network. -->
95                     <LinearLayout
96                         android:id="@+id/voice_network_linearlayout"
97                         android:layout_height="wrap_content"
98                         android:layout_width="wrap_content"
99                         android:layout_gravity="center_horizontal"
100                         android:orientation="vertical" >
101
102                         <TextView
103                             android:id="@+id/voice_network"
104                             android:layout_height="wrap_content"
105                             android:layout_width="wrap_content"
106                             android:layout_gravity="center_horizontal"
107                             android:textAlignment="center"
108                             android:layout_marginTop="30dp"
109                             android:textSize="18sp"
110                             android:textStyle="bold" />
111
112                         <TextView
113                             android:id="@+id/voice_network_details"
114                             android:layout_height="wrap_content"
115                             android:layout_width="wrap_content"
116                             android:layout_gravity="center_horizontal"
117                             android:textAlignment="center"
118                             android:layout_marginBottom="10dp" />
119                     </LinearLayout>
120
121                     <!-- Data network. -->
122                     <LinearLayout
123                         android:id="@+id/data_network_linearlayout"
124                         android:layout_height="wrap_content"
125                         android:layout_width="wrap_content"
126                         android:layout_gravity="center_horizontal"
127                         android:orientation="vertical" >
128
129                         <TextView
130                             android:id="@+id/data_network"
131                             android:layout_height="wrap_content"
132                             android:layout_width="wrap_content"
133                             android:layout_gravity="center_horizontal"
134                             android:textAlignment="center"
135                             android:textSize="18sp"
136                             android:textStyle="bold" />
137
138                         <TextView
139                             android:id="@+id/data_network_details"
140                             android:layout_height="wrap_content"
141                             android:layout_width="wrap_content"
142                             android:layout_gravity="center_horizontal"
143                             android:textAlignment="center"
144                             android:layout_marginBottom="10dp" />
145                     </LinearLayout>
146
147                     <!-- Additional network info. -->
148                     <LinearLayout
149                         android:id="@+id/additional_network_info_linearlayout"
150                         android:layout_height="wrap_content"
151                         android:layout_width="wrap_content"
152                         android:layout_gravity="center_horizontal"
153                         android:orientation="vertical" >
154
155                         <TextView
156                             android:id="@+id/additional_network_info"
157                             android:layout_height="wrap_content"
158                             android:layout_width="wrap_content"
159                             android:layout_gravity="center_horizontal"
160                             android:textAlignment="center"
161                             android:textSize="18sp"
162                             android:textStyle="bold" />
163
164                         <TextView
165                             android:id="@+id/additional_network_info_details"
166                             android:layout_height="wrap_content"
167                             android:layout_width="wrap_content"
168                             android:layout_gravity="center_horizontal"
169                             android:textAlignment="center" />
170                     </LinearLayout>
171                 </LinearLayout>
172             </ScrollView>
173         </LinearLayout>
174     </androidx.coordinatorlayout.widget.CoordinatorLayout>
175
176     <!-- The navigation drawer. -->
177     <com.google.android.material.navigation.NavigationView
178         android:id="@+id/navigationview"
179         android:layout_height="match_parent"
180         android:layout_width="wrap_content"
181         android:layout_gravity="start"
182         app:menu="@menu/navigation_menu_top_appbar"
183         app:itemIconTint="@color/blue_icon" />
184 </androidx.drawerlayout.widget.DrawerLayout>