]> gitweb.stoutner.com Git - PrivacyCell.git/blob - app/src/main/res/layout/privacy_cell_drawerlayout.xml
Create the navigation menu outline.
[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="wrap_content" >
56
57                 <LinearLayout
58                     android:layout_height="wrap_content"
59                     android:layout_width="wrap_content"
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                     <TextView
73                         android:id="@+id/secure_from_stingray_textview"
74                         android:layout_height="wrap_content"
75                         android:layout_width="wrap_content"
76                         android:layout_gravity="center_horizontal"
77                         android:textAlignment="center"
78                         android:layout_marginTop="10dp"
79                         android:textColor="?android:textColorPrimary"
80                         android:textSize="20sp"
81                         android:textStyle="bold" />
82
83                     <!-- Voice network. -->
84                     <TextView
85                         android:id="@+id/voice_network"
86                         android:layout_height="wrap_content"
87                         android:layout_width="wrap_content"
88                         android:layout_gravity="center_horizontal"
89                         android:textAlignment="center"
90                         android:layout_marginTop="30dp"
91                         android:textColor="@color/blue_text"
92                         android:textSize="18sp"
93                         android:textStyle="bold" />
94
95                     <TextView
96                         android:id="@+id/voice_network_details"
97                         android:layout_height="wrap_content"
98                         android:layout_width="wrap_content"
99                         android:layout_gravity="center_horizontal"
100                         android:textAlignment="center"
101                         android:layout_marginBottom="10dp" />
102
103                     <!-- Data network. -->
104                     <TextView
105                         android:id="@+id/data_network"
106                         android:layout_height="wrap_content"
107                         android:layout_width="wrap_content"
108                         android:layout_gravity="center_horizontal"
109                         android:textAlignment="center"
110                         android:textColor="@color/blue_text"
111                         android:textSize="18sp"
112                         android:textStyle="bold" />
113
114                     <TextView
115                         android:id="@+id/data_network_details"
116                         android:layout_height="wrap_content"
117                         android:layout_width="wrap_content"
118                         android:layout_gravity="center_horizontal"
119                         android:textAlignment="center"
120                         android:layout_marginBottom="10dp" />
121
122                     <!-- Additional network info. -->
123                     <TextView
124                         android:id="@+id/additional_network_info"
125                         android:layout_height="wrap_content"
126                         android:layout_width="wrap_content"
127                         android:layout_gravity="center_horizontal"
128                         android:textAlignment="center"
129                         android:textColor="@color/blue_text"
130                         android:textSize="18sp"
131                         android:textStyle="bold" />
132
133                     <TextView
134                         android:id="@+id/additional_network_info_details"
135                         android:layout_height="wrap_content"
136                         android:layout_width="wrap_content"
137                         android:layout_gravity="center_horizontal"
138                         android:textAlignment="center" />
139                 </LinearLayout>
140             </ScrollView>
141         </LinearLayout>
142     </androidx.coordinatorlayout.widget.CoordinatorLayout>
143
144     <!-- The navigation drawer. -->
145     <com.google.android.material.navigation.NavigationView
146         android:id="@+id/navigationview"
147         android:layout_height="match_parent"
148         android:layout_width="wrap_content"
149         android:layout_gravity="start"
150         app:menu="@menu/navigation_menu_top_appbar"
151         app:itemIconTint="@color/icon" />
152 </androidx.drawerlayout.widget.DrawerLayout>