From a8328d4a96b6bded20e5fbc994ad57237e0008cd Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Fri, 12 Jun 2020 22:38:37 +0200 Subject: [PATCH] Add GUI to change alias (closes #1888) Could look nicer... --- .../adapter/GBDeviceAdapterv2.java | 48 +++++++++++++++++++ .../gadgetbridge/database/DBHelper.java | 4 ++ .../gadgetbridge/impl/GBDevice.java | 4 ++ app/src/main/res/layout/device_itemv2.xml | 28 ++++++++--- app/src/main/res/values/strings.xml | 1 + 5 files changed, 79 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java index 84e2ace51..61765c441 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/adapter/GBDeviceAdapterv2.java @@ -57,8 +57,13 @@ import nodomain.freeyourgadget.gadgetbridge.activities.ConfigureAlarms; import nodomain.freeyourgadget.gadgetbridge.activities.VibrationActivity; import nodomain.freeyourgadget.gadgetbridge.activities.charts.ChartsActivity; import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsActivity; +import nodomain.freeyourgadget.gadgetbridge.database.DBHandler; +import nodomain.freeyourgadget.gadgetbridge.database.DBHelper; import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.DeviceManager; +import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession; +import nodomain.freeyourgadget.gadgetbridge.entities.Device; +import nodomain.freeyourgadget.gadgetbridge.entities.DeviceDao; import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice; import nodomain.freeyourgadget.gadgetbridge.model.BatteryState; import nodomain.freeyourgadget.gadgetbridge.model.DeviceType; @@ -468,6 +473,47 @@ public class GBDeviceAdapterv2 extends RecyclerView.Adapter