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 app bar below the main content below the main content. -->
35 android:layout_height="match_parent"
36 android:layout_width="match_parent"
37 android:orientation="vertical" >
39 <!-- The main content is wrapped in a scroll view. -->
41 android:layout_height="0dp"
42 android:layout_width="match_parent"
43 android:layout_weight="1" >
46 android:layout_height="wrap_content"
47 android:layout_width="match_parent"
48 android:orientation="vertical"
49 android:padding="15dp" >
51 <!-- Overall status. -->
53 android:id="@+id/overall_status_linearlayout"
54 android:layout_height="wrap_content"
55 android:layout_width="wrap_content"
56 android:layout_gravity="center_horizontal"
57 android:orientation="vertical"
58 tools:ignore="UseCompoundDrawables" >
61 android:id="@+id/overall_status_imageview"
62 android:layout_width="wrap_content"
63 android:layout_height="wrap_content"
64 android:layout_gravity="center_horizontal"
65 tools:ignore="ContentDescription" />
67 <!-- The text color primary is only displayed if the read phone state permission is not granted.
68 The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
70 android:id="@+id/overall_status_textview"
71 android:layout_height="wrap_content"
72 android:layout_width="wrap_content"
73 android:layout_gravity="center_horizontal"
74 android:textAlignment="center"
75 android:layout_marginTop="10dp"
76 android:textColor="?android:textColorPrimary"
77 android:textSize="20sp"
78 android:textStyle="bold"
79 android:text="@string/not_connected" />
82 <!-- Voice network. -->
84 android:id="@+id/voice_network_linearlayout"
85 android:layout_height="wrap_content"
86 android:layout_width="wrap_content"
87 android:layout_gravity="center_horizontal"
88 android:orientation="vertical" >
91 android:id="@+id/voice_network"
92 android:layout_height="wrap_content"
93 android:layout_width="wrap_content"
94 android:layout_gravity="center_horizontal"
95 android:textAlignment="center"
96 android:layout_marginTop="30dp"
97 android:textSize="18sp"
98 android:textStyle="bold" />
101 android:id="@+id/voice_network_details"
102 android:layout_height="wrap_content"
103 android:layout_width="wrap_content"
104 android:layout_gravity="center_horizontal"
105 android:textAlignment="center"
106 android:layout_marginBottom="10dp" />
109 <!-- Data network. -->
111 android:id="@+id/data_network_linearlayout"
112 android:layout_height="wrap_content"
113 android:layout_width="wrap_content"
114 android:layout_gravity="center_horizontal"
115 android:orientation="vertical" >
118 android:id="@+id/data_network"
119 android:layout_height="wrap_content"
120 android:layout_width="wrap_content"
121 android:layout_gravity="center_horizontal"
122 android:textAlignment="center"
123 android:textSize="18sp"
124 android:textStyle="bold" />
127 android:id="@+id/data_network_details"
128 android:layout_height="wrap_content"
129 android:layout_width="wrap_content"
130 android:layout_gravity="center_horizontal"
131 android:textAlignment="center"
132 android:layout_marginBottom="10dp" />
135 <!-- Additional network info. -->
137 android:id="@+id/additional_network_info_linearlayout"
138 android:layout_height="wrap_content"
139 android:layout_width="wrap_content"
140 android:layout_gravity="center_horizontal"
141 android:orientation="vertical" >
144 android:id="@+id/additional_network_info"
145 android:layout_height="wrap_content"
146 android:layout_width="wrap_content"
147 android:layout_gravity="center_horizontal"
148 android:textAlignment="center"
149 android:textSize="18sp"
150 android:textStyle="bold" />
153 android:id="@+id/additional_network_info_details"
154 android:layout_height="wrap_content"
155 android:layout_width="wrap_content"
156 android:layout_gravity="center_horizontal"
157 android:textAlignment="center" />
162 <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
163 <com.google.android.material.appbar.AppBarLayout
164 android:layout_height="wrap_content"
165 android:layout_width="match_parent"
166 android:background="?android:attr/colorBackground"
167 android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" >
169 <androidx.appcompat.widget.Toolbar
170 android:id="@+id/toolbar"
171 android:layout_height="wrap_content"
172 android:layout_width="match_parent" />
173 </com.google.android.material.appbar.AppBarLayout>
175 </androidx.coordinatorlayout.widget.CoordinatorLayout>
177 <!-- The navigation drawer. -->
178 <com.google.android.material.navigation.NavigationView
179 android:id="@+id/navigationview"
180 android:layout_height="match_parent"
181 android:layout_width="wrap_content"
182 android:layout_gravity="start"
183 app:menu="@menu/navigation_menu_bottom_appbar"
184 app:itemIconTint="@color/blue_icon" />
185 </androidx.drawerlayout.widget.DrawerLayout>