diff options
author | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-02-24 07:40:37 +0000 |
---|---|---|
committer | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2022-02-24 07:40:37 +0000 |
commit | 6abf3b8bbcec463dcea8acbba63872d587ff2779 (patch) | |
tree | 3aea080c86ba2f51c6cb8ad4302765d1ddf5b3a6 /app/src/main/res/layout | |
parent | ac0f57662d5c953f73c0561edc11e0ae8c9a0404 (diff) | |
parent | 8d669755396a58eb3894144b25631ff7577954be (diff) |
Merge branch 'update_graphs' into 'main'
Update graph UI, #4582
See merge request e/privacy-central/privacycentralapp!16
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/chart_tooltip.xml | 86 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_dashboard.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/layout/trackers_item_graph.xml | 2 |
3 files changed, 92 insertions, 16 deletions
diff --git a/app/src/main/res/layout/chart_tooltip.xml b/app/src/main/res/layout/chart_tooltip.xml new file mode 100644 index 0000000..a88bc6f --- /dev/null +++ b/app/src/main/res/layout/chart_tooltip.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + ~ Copyright (C) 2022 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/>. + --> + +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="44dp" + > + <View + android:id="@+id/arrow_top_left" + android:layout_width="12dp" + android:layout_height="12dp" + android:layout_gravity="top|left" + android:layout_marginLeft="4dp" + android:background="@drawable/part_square" + android:visibility="gone" + /> + <View + android:id="@+id/arrow_top_center" + android:layout_width="12dp" + android:layout_height="12dp" + android:layout_gravity="top|center_horizontal" + android:background="@drawable/part_square" + android:visibility="gone" + /> + <View + android:id="@+id/arrow_top_right" + android:layout_width="12dp" + android:layout_height="12dp" + android:layout_gravity="top|right" + android:layout_marginRight="4dp" + android:background="@drawable/part_square" + android:visibility="gone" + /> + <TextView + android:id="@+id/label" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center" + android:text="01/00 - 01:59" + android:textColor="@color/white" + android:paddingHorizontal="8dp" + android:background="@drawable/bg_rounded" + android:layout_marginTop="6dp" + android:layout_marginBottom="6dp" + /> + <View + android:id="@+id/arrow_bottom_left" + android:layout_width="12dp" + android:layout_height="12dp" + android:layout_gravity="bottom|left" + android:layout_marginLeft="4dp" + android:background="@drawable/part_square" + android:visibility="gone" + /> + <View + android:id="@+id/arrow_bottom_center" + android:layout_width="12dp" + android:layout_height="12dp" + android:layout_gravity="bottom|center_horizontal" + android:background="@drawable/part_square" + android:visibility="gone" + /> + <View + android:id="@+id/arrow_bottom_right" + android:layout_width="12dp" + android:layout_height="12dp" + android:layout_gravity="bottom|right" + android:layout_marginRight="4dp" + android:background="@drawable/part_square" + android:visibility="gone" + /> +</FrameLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index 66c738c..93c1d36 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -178,32 +178,22 @@ android:text="@string/dashboard_state_ipaddress_off" <com.github.mikephil.charting.charts.BarChart android:id="@+id/graph" - android:layout_height="100dp" + android:layout_height="144dp" android:layout_width="match_parent" app:layout_constraintTop_toBottomOf="@+id/graph_period" android:layout_marginTop="16dp" /> - <View - android:id="@+id/graph_legend_form" - android:layout_width="16dp" - android:layout_height="16dp" - android:padding="1dp" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintTop_toBottomOf="@+id/graph" - android:layout_marginTop="8dp" - android:layout_marginStart="16dp" - android:background="@drawable/ic_disk" - /> <TextView android:id="@+id/graph_legend" android:layout_width="wrap_content" android:layout_height="wrap_content" tools:text="0 Trackers" - android:layout_marginStart="8dp" android:textSize="12sp" - app:layout_constraintLeft_toRightOf="@+id/graph_legend_form" - app:layout_constraintBottom_toBottomOf="@+id/graph_legend_form" + android:layout_marginTop="8dp" + android:layout_marginStart="16dp" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toBottomOf="@+id/graph" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/trackers_item_graph.xml b/app/src/main/res/layout/trackers_item_graph.xml index d0bd9ec..e7245f9 100644 --- a/app/src/main/res/layout/trackers_item_graph.xml +++ b/app/src/main/res/layout/trackers_item_graph.xml @@ -51,7 +51,7 @@ <com.github.mikephil.charting.charts.BarChart android:id="@+id/graph" - android:layout_height="72dp" + android:layout_height="110dp" android:layout_width="match_parent" app:layout_constraintTop_toBottomOf="@+id/graph_period_label" /> |