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 Browser. 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 <!-- Secure from stingray. -->
65 android:id="@+id/secure_from_stingray_imageview"
66 android:layout_width="wrap_content"
67 android:layout_height="wrap_content"
68 android:layout_gravity="center_horizontal"
69 tools:ignore="ContentDescription" />
71 <!-- The text color primary is only displayed if the read phone state permission is not granted.
72 The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
74 android:id="@+id/secure_from_stingray_textview"
75 android:layout_height="wrap_content"
76 android:layout_width="wrap_content"
77 android:layout_gravity="center_horizontal"
78 android:textAlignment="center"
79 android:layout_marginTop="10dp"
80 android:textColor="?android:textColorPrimary"
81 android:textSize="20sp"
82 android:textStyle="bold"
83 android:text="@string/not_connected" />
85 <!-- Voice network. -->
87 android:id="@+id/voice_network"
88 android:layout_height="wrap_content"
89 android:layout_width="wrap_content"
90 android:layout_gravity="center_horizontal"
91 android:textAlignment="center"
92 android:layout_marginTop="30dp"
93 android:textColor="@color/blue_text"
94 android:textSize="18sp"
95 android:textStyle="bold" />
98 android:id="@+id/voice_network_details"
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_marginBottom="10dp" />
105 <!-- Data network. -->
107 android:id="@+id/data_network"
108 android:layout_height="wrap_content"
109 android:layout_width="wrap_content"
110 android:layout_gravity="center_horizontal"
111 android:textAlignment="center"
112 android:textColor="@color/blue_text"
113 android:textSize="18sp"
114 android:textStyle="bold" />
117 android:id="@+id/data_network_details"
118 android:layout_height="wrap_content"
119 android:layout_width="wrap_content"
120 android:layout_gravity="center_horizontal"
121 android:textAlignment="center"
122 android:layout_marginBottom="10dp" />
124 <!-- Additional network info. -->
126 android:id="@+id/additional_network_info"
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="@color/blue_text"
132 android:textSize="18sp"
133 android:textStyle="bold" />
136 android:id="@+id/additional_network_info_details"
137 android:layout_height="wrap_content"
138 android:layout_width="wrap_content"
139 android:layout_gravity="center_horizontal"
140 android:textAlignment="center" />
144 </androidx.coordinatorlayout.widget.CoordinatorLayout>
146 <!-- The navigation drawer. -->
147 <com.google.android.material.navigation.NavigationView
148 android:id="@+id/navigationview"
149 android:layout_height="match_parent"
150 android:layout_width="wrap_content"
151 android:layout_gravity="start"
152 app:menu="@menu/navigation_menu_top_appbar"
153 app:itemIconTint="@color/icon" />
154 </androidx.drawerlayout.widget.DrawerLayout>