diff --git a/app/src/main/assets/fossil_hr/widget2ndTZ.bin b/app/src/main/assets/fossil_hr/widget2ndTZ.bin
index 1aa07387e..4291447f8 100644
Binary files a/app/src/main/assets/fossil_hr/widget2ndTZ.bin and b/app/src/main/assets/fossil_hr/widget2ndTZ.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 f817765b5..e39d636a8 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
@@ -571,6 +571,13 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
} else {
tzSpinner.setSelection(Arrays.asList(timezonesList).indexOf("Etc/UTC"));
}
+ // Set timezone clock timeout
+ final LinearLayout timezoneTimeoutLayout = layout.findViewById(R.id.watchface_widget_timezone_timeout_layout);
+ timezoneTimeoutLayout.setVisibility(View.GONE);
+ final EditText timezoneTimeout = layout.findViewById(R.id.watchface_widget_timezone_timeout);
+ if ((widget != null) && (widget.getExtraConfigInt("timeout_secs", -1) >= 0)) {
+ timezoneTimeout.setText(Integer.toString(widget.getExtraConfigInt("timeout_secs", -1)));
+ }
// Set update timeout value
final LinearLayout updateTimeoutLayout = layout.findViewById(R.id.watchface_widget_update_timeout_layout);
updateTimeoutLayout.setVisibility(View.GONE);
@@ -593,8 +600,10 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
String selectedType = widgetTypesArray.get(typeSpinner.getSelectedItemPosition());
if (selectedType.equals("widget2ndTZ")) {
timezoneLayout.setVisibility(View.VISIBLE);
+ timezoneTimeoutLayout.setVisibility(View.VISIBLE);
} else {
timezoneLayout.setVisibility(View.GONE);
+ timezoneTimeoutLayout.setVisibility(View.GONE);
}
if (selectedType.equals("widgetCustom")) {
sizeLayout.setVisibility(View.VISIBLE);
@@ -644,6 +653,7 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
}
String selectedType = widgetTypesArray.get(typeSpinner.getSelectedItemPosition());
String selectedTZ = tzSpinner.getSelectedItem().toString();
+ int selectedTZtimeout = Integer.parseInt(timezoneTimeout.getText().toString());
int selectedUpdateTimeout = 0;
if (selectedType.equals("widgetCustom")) {
try {
@@ -661,6 +671,7 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
JSONObject extraConfig = new JSONObject();
try {
extraConfig.put("tzName", selectedTZ);
+ extraConfig.put("timeout_secs", selectedTZtimeout);
} catch (JSONException e) {
LOG.warn("JSON error", e);
}
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 eec2d3407..2c969c226 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
@@ -102,6 +102,7 @@ public class HybridHRWatchfaceFactory {
data.put("tzName", widgetDesc.getExtraConfigString("tzName", null));
data.put("loc", tzShortName);
data.put("utc", tzOffsetMins);
+ data.put("timeout_secs", widgetDesc.getExtraConfigInt("timeout_secs", 0));
widget.put("data", data);
}
break;
diff --git a/app/src/main/res/layout/dialog_hybridhr_watchface_widget.xml b/app/src/main/res/layout/dialog_hybridhr_watchface_widget.xml
index c91273ca3..dd7ee7cb4 100644
--- a/app/src/main/res/layout/dialog_hybridhr_watchface_widget.xml
+++ b/app/src/main/res/layout/dialog_hybridhr_watchface_widget.xml
@@ -108,6 +108,23 @@
android:layout_height="wrap_content" />
+
+
+
+
+
Volume Control
Custom widget
Time zone:
+ Clock visibility duration (in seconds):
Update timeout in minutes:
Hide text on timeout:
Show circle on timeout:
diff --git a/external/fossil-hr-watchface b/external/fossil-hr-watchface
index 7c46ccf89..3b35b2a0a 160000
--- a/external/fossil-hr-watchface
+++ b/external/fossil-hr-watchface
@@ -1 +1 @@
-Subproject commit 7c46ccf890b5e6ee30e3711c2f8ed181e4b3f0c6
+Subproject commit 3b35b2a0a6bc0e8a5262e7b61154cdf487fa94a6