From 69f06f598bf63d91ec8abae03bcec4611430b594 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 19 Aug 2023 10:00:47 +0200 Subject: [PATCH] ActivityStats: toolbar --- ui/src/main/AndroidManifest.xml | 2 +- .../nightscout/ui/activities/StatsActivity.kt | 23 ++++- ui/src/main/res/layout/activity_stats.xml | 87 ++++--------------- 3 files changed, 41 insertions(+), 71 deletions(-) diff --git a/ui/src/main/AndroidManifest.xml b/ui/src/main/AndroidManifest.xml index e8d94f6b6c..6901e9d025 100644 --- a/ui/src/main/AndroidManifest.xml +++ b/ui/src/main/AndroidManifest.xml @@ -43,7 +43,7 @@ + android:theme="@style/AppTheme" /> { + onBackPressedDispatcher.onBackPressed() + true + } + + else -> false + } + }) } override fun onPause() { diff --git a/ui/src/main/res/layout/activity_stats.xml b/ui/src/main/res/layout/activity_stats.xml index fc1475cd5d..aef62082a9 100644 --- a/ui/src/main/res/layout/activity_stats.xml +++ b/ui/src/main/res/layout/activity_stats.xml @@ -12,43 +12,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - - - - - - - - - + android:layout_gravity="center" + android:paddingStart="1dp" + android:paddingEnd="1dp" + android:text="@string/reset" + app:icon="@drawable/ic_local_reset" + app:iconTint="@color/ic_local_reset" /> @@ -95,7 +62,6 @@ + app:icon="@drawable/ic_local_reset" + app:iconTint="@color/ic_local_reset" /> @@ -188,24 +155,6 @@ - - - - - -