From df6f59213b7132f18b04dbd57db57695fd6224b0 Mon Sep 17 00:00:00 2001 From: vanous Date: Mon, 24 Aug 2020 16:54:05 +0200 Subject: [PATCH] Make nicer format for Date/Time in ActivitySummaryList --- .../adapter/ActivitySummariesAdapter.java | 31 +++++++++++++++---- .../gadgetbridge/util/DateTimeUtils.java | 3 ++ app/src/main/res/values/strings.xml | 2 ++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/ActivitySummariesAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/ActivitySummariesAdapter.java index f69897d32..9afdac070 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/ActivitySummariesAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/ActivitySummariesAdapter.java @@ -17,14 +17,17 @@ package nodomain.freeyourgadget.gadgetbridge.adapter; import android.content.Context; +import android.text.format.DateUtils; import android.widget.Toast; +import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.concurrent.TimeUnit; import de.greenrobot.dao.query.QueryBuilder; import nodomain.freeyourgadget.gadgetbridge.GBApplication; +import nodomain.freeyourgadget.gadgetbridge.R; import nodomain.freeyourgadget.gadgetbridge.database.DBHandler; import nodomain.freeyourgadget.gadgetbridge.database.DBHelper; import nodomain.freeyourgadget.gadgetbridge.entities.BaseActivitySummary; @@ -116,16 +119,32 @@ public class ActivitySummariesAdapter extends AbstractItemAdapterSport Activities Sport Activity Detail Edit name + Today + Yesterday Biking Treadmill Exercise