From 717e4fa68f76657f1b9b8d106c684c7f734fe972 Mon Sep 17 00:00:00 2001 From: Claes Date: Tue, 6 Oct 2026 22:06:22 +0200 Subject: [PATCH 1/4] fix: remove run notification when activity completes (#1397) Notifications were left stuck after the completion of a workout. Cancel the notification id explicitly removes it. --- .../notification/ForegroundNotificationDisplayStrategy.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/org/runnerup/notification/ForegroundNotificationDisplayStrategy.java b/app/src/main/org/runnerup/notification/ForegroundNotificationDisplayStrategy.java index d9405b792..c7645fdb4 100644 --- a/app/src/main/org/runnerup/notification/ForegroundNotificationDisplayStrategy.java +++ b/app/src/main/org/runnerup/notification/ForegroundNotificationDisplayStrategy.java @@ -47,5 +47,10 @@ public void notify(int notificationId, Notification notification) { public void cancel(int notificationId) { isForeground = false; ServiceCompat.stopForeground(service, ServiceCompat.STOP_FOREGROUND_REMOVE); + // Updates after the first are posted with notify(), and the service may already have + // left the foreground (RunActivity.doStop), so remove the notification explicitly too. + android.app.NotificationManager notificationManager = + (android.app.NotificationManager) service.getSystemService(Context.NOTIFICATION_SERVICE); + notificationManager.cancel(notificationId); } } From d8ce5d08b1e0694b5712b9d7fafd5a97180e2c0d Mon Sep 17 00:00:00 2001 From: Gerhard Olsson Date: Tue, 29 Sep 2026 23:10:41 +0200 Subject: [PATCH 2/4] fix: deprecated TabHost --- app/res/layout/detail.xml | 209 +++++++------- app/res/layout/start.xml | 269 +++++++++--------- app/res/values/styles.xml | 12 +- .../org/runnerup/view/DetailActivity.java | 84 +++--- .../main/org/runnerup/view/StartFragment.java | 107 +++---- 5 files changed, 337 insertions(+), 344 deletions(-) diff --git a/app/res/layout/detail.xml b/app/res/layout/detail.xml index 826afc59c..b2e51ac4a 100644 --- a/app/res/layout/detail.xml +++ b/app/res/layout/detail.xml @@ -88,140 +88,133 @@ - + android:layout_below="@id/appbarlayout" + android:orientation="vertical"> - + android:layout_height="wrap_content" /> - + - + android:layout_height="match_parent" + android:layout_margin="@dimen/activity_margin" + android:orientation="vertical"> - + android:layout_height="wrap_content" + android:layout_marginTop="1px" + android:prompt="@string/Type" + android:text="@string/Sport" /> - - - - - - - - - - - + + + + android:background="@android:color/black" + android:orientation="vertical" + android:visibility="gone"> - + android:layout_gravity="center" + android:text="@string/Heartrate_zones_distribution" + android:textAlignment="center" + android:textColor="@android:color/white" /> + - - - - - - + + + + + + + + android:layout_height="match_parent" /> + - - + + android:orientation="vertical" + android:weightSum="1" /> + - - - - - + + + + + + - - - - + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:minWidth="48dp" + android:minHeight="48dp" /> - + - + - + - - + + - + + + android:padding="16dp"> + android:gravity="bottom|start" + android:orientation="horizontal"> - - - - - - - - - - - - - - - - - - - + + + + + + - - + app:srcCompat="@drawable/ic_watch_white_24dp" /> - - - + + + + + - - -