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_trackers.xml59
-rw-r--r--app/src/main/res/layout/trackers_item_app.xml38
-rw-r--r--app/src/main/res/layout/trackers_item_graph.xml58
3 files changed, 125 insertions, 30 deletions
diff --git a/app/src/main/res/layout/fragment_trackers.xml b/app/src/main/res/layout/fragment_trackers.xml
index 591b2b6..c3e7e43 100644
--- a/app/src/main/res/layout/fragment_trackers.xml
+++ b/app/src/main/res/layout/fragment_trackers.xml
@@ -1,4 +1,6 @@
<?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"
@@ -20,56 +22,53 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- tools:context=".main.MainActivity"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
>
-
<TextView
android:id="@+id/trackers_info"
- android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:paddingTop="16dp"
+ android:lineSpacingExtra="5sp"
android:text="@string/manage_trackers_info"
- android:textColor="@color/black"
- android:textSize="14sp"
/>
- <TextView
- android:fontFamily="sans-serif-medium"
- android:gravity="center_vertical"
- android:id="@+id/learn_more_trackers_info"
- android:layout_height="48dp"
- android:layout_width="wrap_content"
- android:text="@string/learn_more"
- android:textColor="#007fff"
- android:textSize="14sp"
+ <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}"
/>
-
- <ImageView
- android:layout_height="300dp"
- android:layout_width="wrap_content"
- android:scaleType="centerInside"
- android:src="@drawable/dummy_trackers_usage"
+ <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_gravity="center_horizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:paddingTop="16dp"
- android:text="@string/following_trackers_in_use"
- android:textColor="@color/black"
- android:textSize="16sp"
+ android:text="@string/trackers_applist_title"
/>
<androidx.recyclerview.widget.RecyclerView
- android:id="@+id/recylcer_view_trackers"
- android:layout_height="match_parent"
+ android:id="@+id/apps"
+ android:layout_height="wrap_content"
android:layout_width="match_parent"
- tools:listitem="@layout/item_list_tracker"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
-</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
+</layout> \ No newline at end of file
diff --git a/app/src/main/res/layout/trackers_item_app.xml b/app/src/main/res/layout/trackers_item_app.xml
new file mode 100644
index 0000000..b368664
--- /dev/null
+++ b/app/src/main/res/layout/trackers_item_app.xml
@@ -0,0 +1,38 @@
+<?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"
+ android:background="?attr/selectableItemBackground"
+ >
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_height="32dp"
+ android:layout_width="32dp"
+ android:src="@drawable/ic_facebook"
+ />
+
+ <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"
+ />
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:src="@drawable/ic_chevron_right_24dp"
+ />
+</androidx.appcompat.widget.LinearLayoutCompat>
diff --git a/app/src/main/res/layout/trackers_item_graph.xml b/app/src/main/res/layout/trackers_item_graph.xml
new file mode 100644
index 0000000..afb93de
--- /dev/null
+++ b/app/src/main/res/layout/trackers_item_graph.xml
@@ -0,0 +1,58 @@
+<?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:app="http://schemas.android.com/apk/res-auto"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ >
+ <data>
+ <variable name="period" type="String" />
+ </data>
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView
+ android:id="@+id/trackers_count_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="16dp"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="14 trackers"
+ />
+
+ <TextView
+ android:id="@+id/graph_period_label"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="@color/grey_text_2"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ android:layout_marginRight="16dp"
+ android:text="@{period}"
+ tools:text="24 hours"
+ />
+
+ <com.github.mikephil.charting.charts.BarChart
+ android:id="@+id/graph"
+ android:layout_height="72dp"
+ android:layout_width="match_parent"
+ app:layout_constraintTop_toBottomOf="@+id/graph_period_label"
+ />
+ </androidx.constraintlayout.widget.ConstraintLayout>
+</layout> \ No newline at end of file