1 <?xml version="1.0" encoding="utf-8"?>
4 SPDX-License-Identifier: GPL-3.0-or-later
5 SPDX-FileCopyrightText: 2021-2022, 2025 Soren Stoutner <soren@stoutner.com>
7 This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell/>.
9 This program is free software: you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free Software
11 Foundation, either version 3 of the License, or (at your option) any later
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 You should have received a copy of the GNU General Public License along with
20 this program. If not, see <https://www.gnu.org/licenses/>. -->
22 <!-- API 35 (Android 15) requires setting `android:fitsSystemWindows="true"`. -->
24 xmlns:android="http://schemas.android.com/apk/res/android"
25 xmlns:tools="http://schemas.android.com/tools"
26 xmlns:app="http://schemas.android.com/apk/res-auto"
27 android:layout_height="match_parent"
28 android:layout_width="match_parent"
29 android:fitsSystemWindows="true" >
31 <androidx.drawerlayout.widget.DrawerLayout
32 android:id="@+id/drawerlayout"
33 android:layout_height="match_parent"
34 android:layout_width="match_parent">
36 <androidx.coordinatorlayout.widget.CoordinatorLayout
37 android:layout_height="match_parent"
38 android:layout_width="match_parent" >
40 <!-- The linear layout with `orientation="vertical"` moves the app bar below the main content. -->
42 android:layout_height="match_parent"
43 android:layout_width="match_parent"
44 android:orientation="vertical" >
46 <!-- The main content is wrapped in a scroll view. -->
48 android:layout_height="0dp"
49 android:layout_width="match_parent"
50 android:layout_weight="1" >
53 android:layout_height="wrap_content"
54 android:layout_width="match_parent"
55 android:orientation="vertical" >
57 <!-- Overall status. -->
58 <androidx.cardview.widget.CardView
59 android:id="@+id/overall_status_cardview"
60 android:layout_height="wrap_content"
61 android:layout_width="match_parent"
62 android:layout_marginTop="20dp"
63 android:layout_marginStart="20dp"
64 android:layout_marginEnd="20dp"
65 android:layout_marginBottom="10dp" >
68 android:id="@+id/overall_status_linearlayout"
69 android:layout_height="wrap_content"
70 android:layout_width="wrap_content"
71 android:layout_gravity="center_horizontal"
72 android:orientation="vertical"
73 android:layout_margin="20dp"
74 tools:ignore="UseCompoundDrawables" >
77 android:id="@+id/overall_status_imageview"
78 android:layout_width="wrap_content"
79 android:layout_height="wrap_content"
80 android:layout_gravity="center_horizontal"
81 tools:ignore="ContentDescription" />
83 <!-- The text color primary is only displayed if the read phone state permission is not granted.
84 The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
86 android:id="@+id/overall_status_textview"
87 android:layout_height="wrap_content"
88 android:layout_width="wrap_content"
89 android:layout_gravity="center_horizontal"
90 android:textAlignment="center"
91 android:layout_marginTop="10dp"
92 android:textColor="?android:textColorPrimary"
93 android:textSize="20sp"
94 android:textStyle="bold"
95 android:text="@string/not_connected" />
97 </androidx.cardview.widget.CardView>
99 <!-- Voice network. -->
100 <androidx.cardview.widget.CardView
101 android:id="@+id/voice_network_cardview"
102 android:layout_height="wrap_content"
103 android:layout_width="match_parent"
104 android:layout_marginTop="10dp"
105 android:layout_marginStart="20dp"
106 android:layout_marginEnd="20dp"
107 android:layout_marginBottom="10dp" >
110 android:layout_height="wrap_content"
111 android:layout_width="wrap_content"
112 android:layout_gravity="center_horizontal"
113 android:orientation="vertical"
114 android:layout_margin="15dp" >
117 android:id="@+id/voice_network"
118 android:layout_height="wrap_content"
119 android:layout_width="wrap_content"
120 android:layout_gravity="center_horizontal"
121 android:textAlignment="center"
122 android:textSize="18sp"
123 android:textStyle="bold" />
126 android:id="@+id/voice_network_details"
127 android:layout_height="wrap_content"
128 android:layout_width="wrap_content"
129 android:layout_gravity="center_horizontal"
130 android:textAlignment="center"
131 android:textColor="?android:textColorPrimary" />
134 android:id="@+id/voice_network_subscription_info"
135 android:layout_height="wrap_content"
136 android:layout_width="wrap_content"
137 android:layout_gravity="center_horizontal"
138 android:textAlignment="center"
139 android:textSize="12sp" />
141 </androidx.cardview.widget.CardView>
143 <!-- Data network. -->
144 <androidx.cardview.widget.CardView
145 android:layout_height="wrap_content"
146 android:layout_width="match_parent"
147 android:layout_marginTop="10dp"
148 android:layout_marginStart="20dp"
149 android:layout_marginEnd="20dp"
150 android:layout_marginBottom="10dp" >
153 android:layout_height="wrap_content"
154 android:layout_width="wrap_content"
155 android:layout_gravity="center_horizontal"
156 android:orientation="vertical"
157 android:layout_margin="15dp" >
160 android:id="@+id/data_network_linearlayout"
161 android:layout_height="wrap_content"
162 android:layout_width="wrap_content"
163 android:layout_gravity="center_horizontal"
164 android:orientation="vertical" >
167 android:id="@+id/data_network"
168 android:layout_height="wrap_content"
169 android:layout_width="wrap_content"
170 android:layout_gravity="center_horizontal"
171 android:textAlignment="center"
172 android:textSize="18sp"
173 android:textStyle="bold"
174 tools:ignore="TooDeepLayout" />
177 android:id="@+id/data_network_details"
178 android:layout_height="wrap_content"
179 android:layout_width="wrap_content"
180 android:layout_gravity="center_horizontal"
181 android:textAlignment="center"
182 android:textColor="?android:textColorPrimary" />
185 android:id="@+id/data_network_subscription_info"
186 android:layout_height="wrap_content"
187 android:layout_width="wrap_content"
188 android:layout_gravity="center_horizontal"
189 android:textAlignment="center"
190 android:textSize="12sp" />
193 <!-- Additional network info. -->
195 android:id="@+id/additional_network_info_linearlayout"
196 android:layout_height="wrap_content"
197 android:layout_width="wrap_content"
198 android:layout_gravity="center_horizontal"
199 android:orientation="vertical" >
202 android:id="@+id/additional_network_info"
203 android:layout_height="wrap_content"
204 android:layout_width="wrap_content"
205 android:layout_gravity="center_horizontal"
206 android:textAlignment="center"
207 android:textSize="18sp"
208 android:textStyle="bold" />
211 android:id="@+id/additional_network_info_details"
212 android:layout_height="wrap_content"
213 android:layout_width="wrap_content"
214 android:layout_gravity="center_horizontal"
215 android:textAlignment="center"
216 android:textColor="?android:textColorPrimary" />
219 </androidx.cardview.widget.CardView>
223 <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
224 <com.google.android.material.appbar.AppBarLayout
225 android:layout_height="wrap_content"
226 android:layout_width="match_parent"
227 android:background="?android:attr/colorBackground"
228 android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" >
230 <androidx.appcompat.widget.Toolbar
231 android:id="@+id/toolbar"
232 android:layout_height="wrap_content"
233 android:layout_width="match_parent" />
234 </com.google.android.material.appbar.AppBarLayout>
236 </androidx.coordinatorlayout.widget.CoordinatorLayout>
238 <!-- The navigation drawer. -->
239 <com.google.android.material.navigation.NavigationView
240 android:id="@+id/navigationview"
241 android:layout_height="match_parent"
242 android:layout_width="wrap_content"
243 android:layout_gravity="start"
244 app:menu="@menu/navigation_menu_bottom_appbar"
245 app:itemIconTint="@color/blue_icon" />
246 </androidx.drawerlayout.widget.DrawerLayout>