Release 1.0.
[PrivacyCell.git] / app / src / main / res / layout / privacy_cell_drawerlayout.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4   Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
5
6   This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
7
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.
12
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.
17
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/>. -->
20
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">
28
29     <androidx.coordinatorlayout.widget.CoordinatorLayout
30         android:layout_height="match_parent"
31         android:layout_width="match_parent" >
32
33         <!-- The linear layout with `orientation="vertical"` moves the main content below the app bar layout. -->
34         <LinearLayout
35             android:layout_height="match_parent"
36             android:layout_width="match_parent"
37             android:orientation="vertical" >
38
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" >
45
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>
51
52             <!-- The main content is wrapped in a scroll view. -->
53             <ScrollView
54                 android:layout_height="match_parent"
55                 android:layout_width="match_parent" >
56
57                 <LinearLayout
58                     android:layout_height="wrap_content"
59                     android:layout_width="match_parent"
60                     android:orientation="vertical"
61                     android:padding="15dp" >
62
63                     <!-- Secure from stingray. -->
64                     <ImageView
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" />
70
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. -->
73                     <TextView
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" />
84
85                     <!-- Voice network. -->
86                     <TextView
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" />
96
97                     <TextView
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" />
104
105                     <!-- Data network. -->
106                     <TextView
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" />
115
116                     <TextView
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" />
123
124                     <!-- Additional network info. -->
125                     <TextView
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" />
134
135                     <TextView
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" />
141                 </LinearLayout>
142             </ScrollView>
143         </LinearLayout>
144     </androidx.coordinatorlayout.widget.CoordinatorLayout>
145
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>