summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorjacquarg <guillaume.jacquart@hoodbrains.com>2021-11-05 11:20:01 +0100
committerjacquarg <guillaume.jacquart@hoodbrains.com>2021-11-05 11:20:01 +0100
commit2d210ca863561ac68445e588d1405d9847716347 (patch)
tree2601b2a04c391d704c2473e629030b3c4c730636 /app/src/main/res/layout
parenta484bf584f4163c8a0a1260e81d598fdec87ff3b (diff)
Embed trackerfilter aar, ui fixes.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/apptrackers_fragment.xml76
-rw-r--r--app/src/main/res/layout/apptrackers_item_tracker_toggle.xml32
-rw-r--r--app/src/main/res/layout/fragment_tracker_apps.xml46
-rw-r--r--app/src/main/res/layout/fragment_trackers.xml87
-rw-r--r--app/src/main/res/layout/trackers_item_graph.xml1
5 files changed, 155 insertions, 87 deletions
diff --git a/app/src/main/res/layout/apptrackers_fragment.xml b/app/src/main/res/layout/apptrackers_fragment.xml
new file mode 100644
index 0000000..1f3063d
--- /dev/null
+++ b/app/src/main/res/layout/apptrackers_fragment.xml
@@ -0,0 +1,76 @@
+<?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/>.
+ -->
+
+<layout 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"
+ >
+
+ <androidx.coordinatorlayout.widget.CoordinatorLayout
+
+ android:background="@color/white"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ >
+
+ <include layout="@layout/topbar" />
+
+ <androidx.core.widget.NestedScrollView
+ android:layout_height="match_parent"
+ 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"
+ >
+ <!--LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/apptrackers_block_all_toggle"
+ />
+ <androidx.appcompat.widget.SwitchCompat
+ android:id="@+id/block_all_toggle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ </LinearLayout-->
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/trackers"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginBottom="32dp"
+ tools:listitem="@layout/apptrackers_item_tracker_toggle"
+ android:visibility="gone"
+ />
+ <TextView
+ android:id="@+id/no_trackers_yet"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="@string/apptrackers_no_trackers_yet"
+ />
+ </LinearLayout>
+ </androidx.core.widget.NestedScrollView>
+ </androidx.coordinatorlayout.widget.CoordinatorLayout>
+</layout> \ No newline at end of file
diff --git a/app/src/main/res/layout/apptrackers_item_tracker_toggle.xml b/app/src/main/res/layout/apptrackers_item_tracker_toggle.xml
new file mode 100644
index 0000000..22678ce
--- /dev/null
+++ b/app/src/main/res/layout/apptrackers_item_tracker_toggle.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.appcompat.widget.LinearLayoutCompat
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/container"
+ android:layout_height="52dp"
+ android:layout_width="match_parent"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:gravity="center_vertical"
+ >
+ <TextView
+ android:id="@+id/title"
+ android:layout_centerVertical="true"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:maxLines="1"
+ android:ellipsize="end"
+ android:layout_marginStart="16dp"
+ android:textSize="14sp"
+ tools:text="Body sensor"
+ />
+
+ <androidx.appcompat.widget.SwitchCompat
+ android:id="@+id/toggle"
+ android:layout_width="wrap_content"
+ android:layout_height="24dp"
+ android:layoutDirection="rtl"
+ android:checked="true"
+ />
+</androidx.appcompat.widget.LinearLayoutCompat>
diff --git a/app/src/main/res/layout/fragment_tracker_apps.xml b/app/src/main/res/layout/fragment_tracker_apps.xml
deleted file mode 100644
index 3341d95..0000000
--- a/app/src/main/res/layout/fragment_tracker_apps.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<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:background="@color/white"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- >
-
- <include layout="@layout/topbar" />
-
- <androidx.core.widget.NestedScrollView
- android:layout_height="match_parent"
- 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"
- tools:context=".main.MainActivity"
- >
-
- <TextView
- android:layout_gravity="center_horizontal"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:paddingBottom="16dp"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:paddingTop="16dp"
- android:text="@string/enable_disable_tracker_info"
- android:textColor="@color/black"
- android:textSize="14sp"
- />
-
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/recylcer_view_tracker_apps"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- tools:listitem="@layout/item_app_toggle"
- />
- </LinearLayout>
- </androidx.core.widget.NestedScrollView>
-</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_trackers.xml b/app/src/main/res/layout/fragment_trackers.xml
index c3e7e43..f04379e 100644
--- a/app/src/main/res/layout/fragment_trackers.xml
+++ b/app/src/main/res/layout/fragment_trackers.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layout>
-
<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"
@@ -13,60 +12,66 @@
<androidx.core.widget.NestedScrollView
android:layout_height="match_parent"
- android:layout_marginBottom="32dp"
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:paddingLeft="16dp"
- android:paddingRight="16dp"
>
- <TextView
- android:id="@+id/trackers_info"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:paddingTop="16dp"
- android:lineSpacingExtra="5sp"
- android:text="@string/manage_trackers_info"
- />
-
- <include layout="@layout/trackers_item_graph"
- android:id="@+id/graph_day"
- android:layout_marginTop="32dp"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:period="@{@string/trackers_period_day}"
- />
- <include layout="@layout/trackers_item_graph"
- android:id="@+id/graph_month"
- android:layout_marginTop="16dp"
+ <LinearLayout
+ android:layout_height="match_parent"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:period="@{@string/trackers_period_month}"
- />
- <include layout="@layout/trackers_item_graph"
- android:id="@+id/graph_year"
- android:layout_marginTop="16dp"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:period="@{@string/trackers_period_year}"
- />
- <TextView
- android:layout_gravity="center_horizontal"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:paddingTop="16dp"
- android:text="@string/trackers_applist_title"
- />
+ android:orientation="vertical"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ >
+ <TextView
+ android:id="@+id/trackers_info"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:paddingTop="16dp"
+ android:lineSpacingExtra="5sp"
+ android:text="@string/manage_trackers_info"
+ />
+ <include layout="@layout/trackers_item_graph"
+ android:id="@+id/graph_day"
+ android:layout_marginTop="32dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:period="@{@string/trackers_period_day}"
+ />
+ <include layout="@layout/trackers_item_graph"
+ android:id="@+id/graph_month"
+ android:layout_marginTop="16dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:period="@{@string/trackers_period_month}"
+ />
+ <include layout="@layout/trackers_item_graph"
+ android:id="@+id/graph_year"
+ android:layout_marginTop="16dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:period="@{@string/trackers_period_year}"
+ />
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_marginTop="32dp"
+ android:paddingTop="16dp"
+ android:text="@string/trackers_applist_title"
+ />
+ </LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/apps"
android:layout_height="wrap_content"
android:layout_width="match_parent"
+ android:paddingTop="16dp"
+ android:paddingBottom="32dp"
+ tools:listitem="@layout/trackers_item_app"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
diff --git a/app/src/main/res/layout/trackers_item_graph.xml b/app/src/main/res/layout/trackers_item_graph.xml
index afb93de..d0bd9ec 100644
--- a/app/src/main/res/layout/trackers_item_graph.xml
+++ b/app/src/main/res/layout/trackers_item_graph.xml
@@ -24,6 +24,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingTop="16dp"
>
<TextView