summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/fragment_dashboard.xml15
-rw-r--r--app/src/main/res/layout/fragment_fake_location.xml31
-rw-r--r--app/src/main/res/layout/fragment_internet_activity_policy.xml15
-rw-r--r--app/src/main/res/layout/fragment_permission_apps.xml14
-rw-r--r--app/src/main/res/layout/fragment_permissions.xml14
-rw-r--r--app/src/main/res/layout/fragment_quick_protection.xml15
-rw-r--r--app/src/main/res/layout/topbar.xml37
7 files changed, 59 insertions, 82 deletions
diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml
index 663c270..dc79878 100644
--- a/app/src/main/res/layout/fragment_dashboard.xml
+++ b/app/src/main/res/layout/fragment_dashboard.xml
@@ -1,19 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<ProgressBar
android:id="@+id/loadingSpinner"
@@ -27,8 +20,8 @@
android:id="@+id/scrollContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="?android:attr/actionBarSize"
android:visibility="gone"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
@@ -347,4 +340,4 @@
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_fake_location.xml b/app/src/main/res/layout/fragment_fake_location.xml
index 7d32bfa..40324a1 100644
--- a/app/src/main/res/layout/fragment_fake_location.xml
+++ b/app/src/main/res/layout/fragment_fake_location.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@@ -8,26 +8,19 @@
android:layout_width="match_parent"
>
- <Toolbar
- android:background="@color/white"
- android:id="@+id/toolbar"
- android:layout_gravity="top|center"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_width="match_parent"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<androidx.core.widget.NestedScrollView
android:layout_height="match_parent"
- android:layout_marginBottom="32dp"
- android:layout_marginTop="?android:attr/actionBarSize"
android:layout_width="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
+ android:layout_marginBottom="32dp"
tools:context=".main.MainActivity"
>
@@ -57,20 +50,6 @@
android:textSize="14sp"
/>
- <TextView
- android:fontFamily="sans-serif-medium"
- android:id="@+id/my_location_header"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:paddingBottom="8dp"
- android:paddingTop="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:text="@string/my_location_title"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
-
<RadioGroup
android:id="@+id/location_choices"
android:layout_height="wrap_content"
@@ -152,4 +131,4 @@
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_internet_activity_policy.xml b/app/src/main/res/layout/fragment_internet_activity_policy.xml
index 6a53498..7a5d8b5 100644
--- a/app/src/main/res/layout/fragment_internet_activity_policy.xml
+++ b/app/src/main/res/layout/fragment_internet_activity_policy.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@@ -7,20 +7,13 @@
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="?android:attr/actionBarSize"
android:layout_marginBottom="32dp"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
>
<LinearLayout
@@ -102,4 +95,4 @@
</RadioGroup>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_permission_apps.xml b/app/src/main/res/layout/fragment_permission_apps.xml
index 2888af0..65f4169 100644
--- a/app/src/main/res/layout/fragment_permission_apps.xml
+++ b/app/src/main/res/layout/fragment_permission_apps.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@@ -7,20 +7,12 @@
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:layout_marginTop="?android:attr/actionBarSize"
tools:context=".main.MainActivity"
>
@@ -43,4 +35,4 @@
tools:listitem="@layout/item_permission_apps"
android:id="@+id/recylcer_view_permission_apps"/>
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_permissions.xml b/app/src/main/res/layout/fragment_permissions.xml
index 9d1e972..a452570 100644
--- a/app/src/main/res/layout/fragment_permissions.xml
+++ b/app/src/main/res/layout/fragment_permissions.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@@ -7,14 +7,7 @@
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
+ <include layout="@layout/topbar"/>
<LinearLayout
android:layout_width="match_parent"
@@ -22,7 +15,6 @@
android:orientation="vertical"
android:paddingLeft="32dp"
android:paddingRight="32dp"
- android:layout_marginTop="?android:attr/actionBarSize"
tools:context=".main.MainActivity"
>
@@ -54,4 +46,4 @@
tools:listitem="@layout/item_permission"
android:id="@+id/recylcer_view_permissions"/>
</LinearLayout>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_quick_protection.xml b/app/src/main/res/layout/fragment_quick_protection.xml
index e8233ee..d57a101 100644
--- a/app/src/main/res/layout/fragment_quick_protection.xml
+++ b/app/src/main/res/layout/fragment_quick_protection.xml
@@ -1,26 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
>
- <Toolbar
- android:id="@+id/toolbar"
- android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
- android:layout_gravity="top|center"
- android:background="@color/white"
- tools:layout_height="56dp"
- />
-
+ <include layout="@layout/topbar"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:layout_marginTop="?android:attr/actionBarSize"
android:layout_marginBottom="56dp"
tools:context=".main.MainActivity"
>
@@ -65,4 +56,4 @@
android:textSize="14sp"
android:fontFamily="sans-serif-medium"
android:layout_gravity="bottom|right"/>
-</FrameLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/topbar.xml b/app/src/main/res/layout/topbar.xml
new file mode 100644
index 0000000..9142d79
--- /dev/null
+++ b/app/src/main/res/layout/topbar.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2021 E FOUNDATION
+ ~
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ -->
+
+<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ app:elevation="0dp"
+ >
+
+ <com.google.android.material.appbar.MaterialToolbar
+ android:background="@color/white"
+ android:id="@+id/toolbar"
+ app:titleCentered="true"
+ android:elevation="0dp"
+ android:layout_height="?android:attr/actionBarSize"
+ android:layout_width="match_parent"
+ tools:layout_height="56dp"
+ />
+</com.google.android.material.appbar.AppBarLayout>