1 <?xml version="1.0" encoding="utf-8"?>
4 Copyright © 2021 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" >
53 android:id="@+id/stingray_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/stingray_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/stingray_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:textColor="@color/blue_text"
98 android:textSize="18sp"
99 android:textStyle="bold" />
102 android:id="@+id/voice_network_details"
103 android:layout_height="wrap_content"
104 android:layout_width="wrap_content"
105 android:layout_gravity="center_horizontal"
106 android:textAlignment="center"
107 android:layout_marginBottom="10dp" />
110 <!-- Data network. -->
112 android:id="@+id/data_network_linearlayout"
113 android:layout_height="wrap_content"
114 android:layout_width="wrap_content"
115 android:layout_gravity="center_horizontal"
116 android:orientation="vertical" >
119 android:id="@+id/data_network"
120 android:layout_height="wrap_content"
121 android:layout_width="wrap_content"
122 android:layout_gravity="center_horizontal"
123 android:textAlignment="center"
124 android:textColor="@color/blue_text"
125 android:textSize="18sp"
126 android:textStyle="bold" />
129 android:id="@+id/data_network_details"
130 android:layout_height="wrap_content"
131 android:layout_width="wrap_content"
132 android:layout_gravity="center_horizontal"
133 android:textAlignment="center"
134 android:layout_marginBottom="10dp" />
137 <!-- Additional network info. -->
139 android:id="@+id/additional_network_info_linearlayout"
140 android:layout_height="wrap_content"
141 android:layout_width="wrap_content"
142 android:layout_gravity="center_horizontal"
143 android:orientation="vertical" >
146 android:id="@+id/additional_network_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:textColor="@color/blue_text"
152 android:textSize="18sp"
153 android:textStyle="bold" />
156 android:id="@+id/additional_network_info_details"
157 android:layout_height="wrap_content"
158 android:layout_width="wrap_content"
159 android:layout_gravity="center_horizontal"
160 android:textAlignment="center" />
165 <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
166 <com.google.android.material.appbar.AppBarLayout
167 android:layout_height="wrap_content"
168 android:layout_width="match_parent"
169 android:background="?android:attr/colorBackground"
170 android:theme="@style/ThemeOverlay.AppCompat.DayNight.ActionBar" >
172 <androidx.appcompat.widget.Toolbar
173 android:id="@+id/toolbar"
174 android:layout_height="wrap_content"
175 android:layout_width="match_parent" />
176 </com.google.android.material.appbar.AppBarLayout>
178 </androidx.coordinatorlayout.widget.CoordinatorLayout>
180 <!-- The navigation drawer. -->
181 <com.google.android.material.navigation.NavigationView
182 android:id="@+id/navigationview"
183 android:layout_height="match_parent"
184 android:layout_width="wrap_content"
185 android:layout_gravity="start"
186 app:menu="@menu/navigation_menu_bottom_appbar"
187 app:itemIconTint="@color/icon_enabled" />
188 </androidx.drawerlayout.widget.DrawerLayout>