]> gitweb.stoutner.com Git - PrivacyCell.git/blob - app/src/main/res/layout/privacy_cell_top_appbar.xml
Release 1.7.
[PrivacyCell.git] / app / src / main / res / layout / privacy_cell_top_appbar.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 Cell.  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                     <!-- Stingray. -->
64                     <LinearLayout
65                         android:id="@+id/stingray_linearlayout"
66                         android:layout_height="wrap_content"
67                         android:layout_width="wrap_content"
68                         android:layout_gravity="center_horizontal"
69                         android:orientation="vertical"
70                         tools:ignore="UseCompoundDrawables" >
71
72                         <ImageView
73                             android:id="@+id/stingray_imageview"
74                             android:layout_width="wrap_content"
75                             android:layout_height="wrap_content"
76                             android:layout_gravity="center_horizontal"
77                             tools:ignore="ContentDescription" />
78
79                         <!-- The text color primary is only displayed if the read phone state permission is not granted.
80                             The default text is replaced if the permission is not granted or the device is connected to a cell phone network. -->
81                         <TextView
82                             android:id="@+id/summary_textview"
83                             android:layout_height="wrap_content"
84                             android:layout_width="wrap_content"
85                             android:layout_gravity="center_horizontal"
86                             android:textAlignment="center"
87                             android:layout_marginTop="10dp"
88                             android:textColor="?android:textColorPrimary"
89                             android:textSize="20sp"
90                             android:textStyle="bold"
91                             android:text="@string/not_connected" />
92                     </LinearLayout>
93
94                     <!-- Voice network. -->
95                     <LinearLayout
96                         android:id="@+id/voice_network_linearlayout"
97                         android:layout_height="wrap_content"
98                         android:layout_width="wrap_content"
99                         android:layout_gravity="center_horizontal"
100                         android:orientation="vertical" >
101
102                         <TextView
103                             android:id="@+id/voice_network"
104                             android:layout_height="wrap_content"
105                             android:layout_width="wrap_content"
106                             android:layout_gravity="center_horizontal"
107                             android:textAlignment="center"
108                             android:layout_marginTop="30dp"
109                             android:textColor="@color/blue_text"
110                             android:textSize="18sp"
111                             android:textStyle="bold" />
112
113                         <TextView
114                             android:id="@+id/voice_network_details"
115                             android:layout_height="wrap_content"
116                             android:layout_width="wrap_content"
117                             android:layout_gravity="center_horizontal"
118                             android:textAlignment="center"
119                             android:layout_marginBottom="10dp" />
120                     </LinearLayout>
121
122                     <!-- Data network. -->
123                     <LinearLayout
124                         android:id="@+id/data_network_linearlayout"
125                         android:layout_height="wrap_content"
126                         android:layout_width="wrap_content"
127                         android:layout_gravity="center_horizontal"
128                         android:orientation="vertical" >
129
130                         <TextView
131                             android:id="@+id/data_network"
132                             android:layout_height="wrap_content"
133                             android:layout_width="wrap_content"
134                             android:layout_gravity="center_horizontal"
135                             android:textAlignment="center"
136                             android:textColor="@color/blue_text"
137                             android:textSize="18sp"
138                             android:textStyle="bold" />
139
140                         <TextView
141                             android:id="@+id/data_network_details"
142                             android:layout_height="wrap_content"
143                             android:layout_width="wrap_content"
144                             android:layout_gravity="center_horizontal"
145                             android:textAlignment="center"
146                             android:layout_marginBottom="10dp" />
147                     </LinearLayout>
148
149                     <!-- Additional network info. -->
150                     <LinearLayout
151                         android:id="@+id/additional_network_info_linearlayout"
152                         android:layout_height="wrap_content"
153                         android:layout_width="wrap_content"
154                         android:layout_gravity="center_horizontal"
155                         android:orientation="vertical" >
156
157                         <TextView
158                             android:id="@+id/additional_network_info"
159                             android:layout_height="wrap_content"
160                             android:layout_width="wrap_content"
161                             android:layout_gravity="center_horizontal"
162                             android:textAlignment="center"
163                             android:textColor="@color/blue_text"
164                             android:textSize="18sp"
165                             android:textStyle="bold" />
166
167                         <TextView
168                             android:id="@+id/additional_network_info_details"
169                             android:layout_height="wrap_content"
170                             android:layout_width="wrap_content"
171                             android:layout_gravity="center_horizontal"
172                             android:textAlignment="center" />
173                     </LinearLayout>
174                 </LinearLayout>
175             </ScrollView>
176         </LinearLayout>
177     </androidx.coordinatorlayout.widget.CoordinatorLayout>
178
179     <!-- The navigation drawer. -->
180     <com.google.android.material.navigation.NavigationView
181         android:id="@+id/navigationview"
182         android:layout_height="match_parent"
183         android:layout_width="wrap_content"
184         android:layout_gravity="start"
185         app:menu="@menu/navigation_menu_top_appbar"
186         app:itemIconTint="@color/icon_enabled" />
187 </androidx.drawerlayout.widget.DrawerLayout>