1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
6 This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
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.
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.
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/>. -->
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">
29 <androidx.coordinatorlayout.widget.CoordinatorLayout
30 android:layout_height="match_parent"
31 android:layout_width="match_parent" >
33 <!-- The linear layout with `orientation="vertical"` moves the main content below the app bar layout. -->
35 android:layout_height="match_parent"
36 android:layout_width="match_parent"
37 android:orientation="vertical" >
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" >
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>
52 <!-- The main content is wrapped in a scroll view. -->
54 android:layout_height="match_parent"
55 android:layout_width="match_parent" >
58 android:layout_height="wrap_content"
59 android:layout_width="match_parent"
60 android:orientation="vertical"
61 android:padding="15dp" >
63 <!-- Overall status. -->
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" >
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" />
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. -->
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" />
94 <!-- Voice network. -->
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" >
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" />
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" />
121 <!-- Data network. -->
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" >
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" />
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" />
147 <!-- Additional network info. -->
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" >
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" />
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" />
174 </androidx.coordinatorlayout.widget.CoordinatorLayout>
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>