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 main content below the app bar layout. -->
42 android:layout_height="match_parent"
43 android:layout_width="match_parent"
44 android:orientation="vertical" >
46 <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
47 <com.google.android.material.appbar.AppBarLayout
48 android:layout_height="wrap_content"
49 android:layout_width="match_parent"
50 android:background="?android:attr/colorBackground"
51 android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" >
53 <androidx.appcompat.widget.Toolbar
54 android:id="@+id/toolbar"
55 android:layout_height="wrap_content"
56 android:layout_width="match_parent" />
57 </com.google.android.material.appbar.AppBarLayout>
59 <!-- The main content is wrapped in a scroll view. -->
61 android:layout_height="match_parent"
62 android:layout_width="match_parent" >
65 android:layout_height="wrap_content"
66 android:layout_width="match_parent"
67 android:orientation="vertical" >
69 <!-- Overall status. -->
70 <androidx.cardview.widget.CardView
71 android:id="@+id/overall_status_cardview"
72 android:layout_height="wrap_content"
73 android:layout_width="match_parent"
74 android:layout_marginTop="20dp"
75 android:layout_marginStart="20dp"
76 android:layout_marginEnd="20dp"
77 android:layout_marginBottom="10dp" >
80 android:id="@+id/overall_status_linearlayout"
81 android:layout_height="wrap_content"
82 android:layout_width="wrap_content"
83 android:layout_gravity="center_horizontal"
84 android:orientation="vertical"
85 android:layout_margin="20dp"
86 tools:ignore="UseCompoundDrawables" >
89 android:id="@+id/overall_status_imageview"
90 android:layout_width="wrap_content"
91 android:layout_height="wrap_content"
92 android:layout_gravity="center_horizontal"
93 tools:ignore="ContentDescription" />
95 <!-- The text color primary is only displayed if the read phone state permission is not granted.
96 The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
98 android:id="@+id/overall_status_textview"
99 android:layout_height="wrap_content"
100 android:layout_width="wrap_content"
101 android:layout_gravity="center_horizontal"
102 android:textAlignment="center"
103 android:layout_marginTop="10dp"
104 android:textColor="?android:textColorPrimary"
105 android:textSize="20sp"
106 android:textStyle="bold"
107 android:text="@string/not_connected" />
109 </androidx.cardview.widget.CardView>
111 <!-- Voice network. -->
112 <androidx.cardview.widget.CardView
113 android:id="@+id/voice_network_cardview"
114 android:layout_height="wrap_content"
115 android:layout_width="match_parent"
116 android:layout_marginTop="10dp"
117 android:layout_marginStart="20dp"
118 android:layout_marginEnd="20dp"
119 android:layout_marginBottom="10dp" >
122 android:layout_height="wrap_content"
123 android:layout_width="wrap_content"
124 android:layout_gravity="center_horizontal"
125 android:orientation="vertical"
126 android:layout_margin="15dp" >
129 android:id="@+id/voice_network"
130 android:layout_height="wrap_content"
131 android:layout_width="wrap_content"
132 android:layout_gravity="center_horizontal"
133 android:textAlignment="center"
134 android:textSize="18sp"
135 android:textStyle="bold" />
138 android:id="@+id/voice_network_details"
139 android:layout_height="wrap_content"
140 android:layout_width="wrap_content"
141 android:layout_gravity="center_horizontal"
142 android:textAlignment="center"
143 android:textColor="?android:textColorPrimary" />
146 android:id="@+id/voice_network_subscription_info"
147 android:layout_height="wrap_content"
148 android:layout_width="wrap_content"
149 android:layout_gravity="center_horizontal"
150 android:textAlignment="center"
151 android:textSize="12sp" />
153 </androidx.cardview.widget.CardView>
155 <!-- Data network. -->
156 <androidx.cardview.widget.CardView
157 android:layout_height="wrap_content"
158 android:layout_width="match_parent"
159 android:layout_marginTop="10dp"
160 android:layout_marginStart="20dp"
161 android:layout_marginEnd="20dp"
162 android:layout_marginBottom="10dp" >
165 android:layout_height="wrap_content"
166 android:layout_width="wrap_content"
167 android:layout_gravity="center_horizontal"
168 android:orientation="vertical"
169 android:layout_margin="15dp" >
172 android:id="@+id/data_network_linearlayout"
173 android:layout_height="wrap_content"
174 android:layout_width="wrap_content"
175 android:layout_gravity="center_horizontal"
176 android:orientation="vertical" >
179 android:id="@+id/data_network"
180 android:layout_height="wrap_content"
181 android:layout_width="wrap_content"
182 android:layout_gravity="center_horizontal"
183 android:textAlignment="center"
184 android:textSize="18sp"
185 android:textStyle="bold"
186 tools:ignore="TooDeepLayout" />
189 android:id="@+id/data_network_details"
190 android:layout_height="wrap_content"
191 android:layout_width="wrap_content"
192 android:layout_gravity="center_horizontal"
193 android:textAlignment="center"
194 android:textColor="?android:textColorPrimary" />
197 android:id="@+id/data_network_subscription_info"
198 android:layout_height="wrap_content"
199 android:layout_width="wrap_content"
200 android:layout_gravity="center_horizontal"
201 android:textAlignment="center"
202 android:textSize="12sp"
203 android:layout_marginBottom="20dp" />
206 <!-- Additional network info. -->
208 android:id="@+id/additional_network_info_linearlayout"
209 android:layout_height="wrap_content"
210 android:layout_width="wrap_content"
211 android:layout_gravity="center_horizontal"
212 android:orientation="vertical" >
215 android:id="@+id/additional_network_info"
216 android:layout_height="wrap_content"
217 android:layout_width="wrap_content"
218 android:layout_gravity="center_horizontal"
219 android:textAlignment="center"
220 android:textSize="18sp"
221 android:textStyle="bold" />
224 android:id="@+id/additional_network_info_details"
225 android:layout_height="wrap_content"
226 android:layout_width="wrap_content"
227 android:layout_gravity="center_horizontal"
228 android:textAlignment="center"
229 android:textColor="?android:textColorPrimary" />
232 </androidx.cardview.widget.CardView>
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_top_appbar"
245 app:itemIconTint="@color/blue_icon" />
246 </androidx.drawerlayout.widget.DrawerLayout>