diff --git a/app/src/main/assets/fossil_hr/openSourceWatchface.bin b/app/src/main/assets/fossil_hr/openSourceWatchface.bin index f8af52fdc..e17b62ced 100644 Binary files a/app/src/main/assets/fossil_hr/openSourceWatchface.bin and b/app/src/main/assets/fossil_hr/openSourceWatchface.bin differ diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceDesignerActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceDesignerActivity.java index 64c5a84b7..fdbe0bab5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceDesignerActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceDesignerActivity.java @@ -402,6 +402,9 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem if (watchfaceConfig.has("toggle_backlight_event")) { watchfaceSettings.setToggleBacklightEvent(watchfaceConfig.getString("toggle_backlight_event")); } + if (watchfaceConfig.has("move_hands_event")) { + watchfaceSettings.setMoveHandsEvent(watchfaceConfig.getString("move_hands_event")); + } if (watchfaceConfig.has("powersave_display")) { watchfaceSettings.setPowersaveDisplay(watchfaceConfig.getBoolean("powersave_display")); } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java index cef895c0a..cb55791b1 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceFactory.java @@ -303,6 +303,7 @@ public class HybridHRWatchfaceFactory { config.put("wrist_flick_move_minute", settings.getWristFlickMoveMinute()); config.put("toggle_widgets_event", settings.getToggleWidgetsEvent()); config.put("toggle_backlight_event", settings.getToggleBacklightEvent()); + config.put("move_hands_event", settings.getMoveHandsEvent()); config.put("powersave_display", settings.getPowersaveDisplay()); config.put("powersave_hands", settings.getPowersaveHands()); config.put("light_up_on_notification", settings.getLightUpOnNotification()); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettings.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettings.java index 4f947e874..51bfa7df7 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettings.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettings.java @@ -27,6 +27,7 @@ public class HybridHRWatchfaceSettings implements Serializable { private int wristFlickMoveMinute = -360; private String toggleWidgetsEvent = ""; private String toggleBacklightEvent = ""; + private String moveHandsEvent = "flick_away"; private boolean powersaveDisplay = false; private boolean powersaveHands = false; private boolean lightUpOnNotification = false; @@ -118,6 +119,14 @@ public class HybridHRWatchfaceSettings implements Serializable { this.toggleBacklightEvent = event; } + public String getMoveHandsEvent() { + return moveHandsEvent; + } + + public void setMoveHandsEvent(String event) { + this.moveHandsEvent = event; + } + public boolean getPowersaveDisplay() { return powersaveDisplay; } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettingsActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettingsActivity.java index 30ffe04d8..dd6ebcf9f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettingsActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/HybridHRWatchfaceSettingsActivity.java @@ -115,6 +115,11 @@ public class HybridHRWatchfaceSettingsActivity extends AbstractSettingsActivity toggle_backlight.setValue(settings.getToggleBacklightEvent()); toggle_backlight.setSummary(toggle_backlight.getEntry()); + ListPreference move_hands = (ListPreference) findPreference("pref_hybridhr_watchface_move_hands"); + move_hands.setOnPreferenceChangeListener(this); + move_hands.setValue(settings.getMoveHandsEvent()); + move_hands.setSummary(move_hands.getEntry()); + SwitchPreference power_saving_display = (SwitchPreference) findPreference("pref_hybridhr_watchface_power_saving_display"); power_saving_display.setOnPreferenceChangeListener(this); power_saving_display.setChecked(settings.getPowersaveDisplay()); @@ -164,6 +169,11 @@ public class HybridHRWatchfaceSettingsActivity extends AbstractSettingsActivity ((ListPreference)preference).setValue(newValue.toString()); preference.setSummary(((ListPreference)preference).getEntry()); break; + case "pref_hybridhr_watchface_move_hands": + settings.setMoveHandsEvent(newValue.toString()); + ((ListPreference)preference).setValue(newValue.toString()); + preference.setSummary(((ListPreference)preference).getEntry()); + break; case "pref_hybridhr_watchface_power_saving_display": settings.setPowersaveDisplay((boolean) newValue); break; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/QHybridConstants.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/QHybridConstants.java index fdda9a68f..c241ea1a2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/QHybridConstants.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/qhybrid/QHybridConstants.java @@ -22,7 +22,7 @@ import java.util.Map; import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind; public final class QHybridConstants { - public static final String HYBRIDHR_WATCHFACE_VERSION = "1.6"; + public static final String HYBRIDHR_WATCHFACE_VERSION = "1.7"; public static final int HYBRID_HR_WATCHFACE_WIDGET_SIZE = 76; public static Map KNOWN_WAPP_VERSIONS = new HashMap() { diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 9a65ed49f..41d682345 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -2046,21 +2046,23 @@ widget_bg_dashed_circle - + @string/menuitem_nothing @string/pref_title_upper_button_function_short @string/pref_title_upper_button_function_long @string/pref_title_middle_button_function_short @string/pref_title_lower_button_function_short @string/pref_title_lower_button_function_long + @string/watchface_setting_title_wrist_flick - + top_short_press_release top_hold middle_short_press_release bottom_short_press_release bottom_hold + flick_away diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ff9457603..d64be7f0c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1559,6 +1559,7 @@ Custom events Toggle widgets Turn backlight on + Move hands A watchface with this name already exists in the cache. Do you want to overwrite it? Upload of the watchface failed. Please try again. Battery diff --git a/app/src/main/res/xml/fossil_hr_watchface_settings.xml b/app/src/main/res/xml/fossil_hr_watchface_settings.xml index ff3bb4717..5a56feb2b 100644 --- a/app/src/main/res/xml/fossil_hr_watchface_settings.xml +++ b/app/src/main/res/xml/fossil_hr_watchface_settings.xml @@ -51,18 +51,26 @@ android:persistent="false" android:title="@string/watchface_setting_button_toggle_widgets" android:key="pref_hybridhr_watchface_toggle_widgets" - android:entries="@array/pref_hybridhr_watchface_buttonevents_items" - android:entryValues="@array/pref_hybridhr_watchface_buttonevents_values" + android:entries="@array/pref_hybridhr_watchface_events_items" + android:entryValues="@array/pref_hybridhr_watchface_events_values" android:dialogTitle="@string/watchface_setting_button_toggle_widgets" android:negativeButtonText="@string/Cancel"/> + diff --git a/external/fossil-hr-watchface b/external/fossil-hr-watchface index 2cb107b23..a858758bc 160000 --- a/external/fossil-hr-watchface +++ b/external/fossil-hr-watchface @@ -1 +1 @@ -Subproject commit 2cb107b23e26546ab27b8d13eacf8b0852d8b514 +Subproject commit a858758bc9e287c9f902e061511f12aee4870972