diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.java b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.java
index 0500786802..a1b195e29f 100644
--- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.java
+++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BaseWatchFace.java
@@ -130,7 +130,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferenc
}
private void setupBatteryReceiver() {
- if (sharedPrefs.getBoolean("simplify_ui_charging", false) && batteryReceiver == null) {
+ if (sharedPrefs.getString("simplify_ui", "off") == "charching" && batteryReceiver == null) {
IntentFilter intentBatteryFilter = new IntentFilter();
intentBatteryFilter.addAction(BatteryManager.ACTION_CHARGING);
intentBatteryFilter.addAction(BatteryManager.ACTION_DISCHARGING);
@@ -306,7 +306,9 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferenc
public void setDataFields() {
setDateAndTime();
-
+ if (setDataFieldsSimpleUi()) {
+ return;
+ }
if (mSgv != null) {
if (sharedPrefs.getBoolean("showBG", true)) {
mSgv.setText(rawData.sSgv);
@@ -485,11 +487,11 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferenc
mLoop.setVisibility(View.GONE);
}
}
- setDataFieldsSimpleUi();
+
}
- void setDataFieldsSimpleUi() {
- if (sharedPrefs.getBoolean("simplify_ui_charging", false) && isCharging()) {
+ boolean setDataFieldsSimpleUi() {
+ if (isSimpleUi()) {
mSimpleUi.setVisibility(View.VISIBLE);
mSimpleSvg.setText(rawData.sSgv);
@@ -513,9 +515,10 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferenc
final java.text.DateFormat timeFormat = DateFormat.getTimeFormat(BaseWatchFace.this);
mSimpleTime.setText(timeFormat.format(System.currentTimeMillis()));
- } else {
- mSimpleUi.setVisibility(View.GONE);
+ return true;
}
+ mSimpleUi.setVisibility(View.GONE);
+ return false;
}
@Override
@@ -598,7 +601,7 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferenc
}
protected void onWatchModeChanged(WatchMode watchMode) {
-
+ setDataFields();
if (lowResMode ^ isLowRes(watchMode)) { //if there was a change in lowResMode
lowResMode = isLowRes(watchMode);
setColor();
@@ -612,6 +615,20 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferenc
return (watchMode == WatchMode.LOW_BIT) || (watchMode == WatchMode.LOW_BIT_BURN_IN); // || (watchMode == WatchMode.LOW_BIT_BURN_IN);
}
+ private boolean isSimpleUi() {
+ String simplify = sharedPrefs.getString("simplify_ui", "off");
+ if (simplify.equals("off")) {
+ return false;
+ }
+ if (simplify.equals("ambient") && getCurrentWatchMode() == WatchMode.AMBIENT) {
+ return true;
+ }
+ if (simplify.equals("charging") && isCharging()) {
+ return true;
+ }
+ return false;
+ }
+
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
setupBatteryReceiver();
@@ -640,6 +657,9 @@ public abstract class BaseWatchFace extends WatchFace implements SharedPreferenc
}
public void setupCharts() {
+ if (isSimpleUi()) {
+ return;
+ }
if (rawData.bgDataList.size() > 0) { //Dont crash things just because we dont have values, people dont like crashy things
int timeframe = Integer.parseInt(sharedPrefs.getString("chart_timeframe", "3"));
if (lowResMode) {
diff --git a/wear/src/main/res/values/arrays.xml b/wear/src/main/res/values/arrays.xml
index b3f80eb126..75f5479ef3 100644
--- a/wear/src/main/res/values/arrays.xml
+++ b/wear/src/main/res/values/arrays.xml
@@ -65,4 +65,16 @@
- none
+
+ - Off
+ - During Charging
+ - Always On Mode
+
+
+
+ - off
+ - charging
+ - ambient
+
+
diff --git a/wear/src/main/res/values/strings.xml b/wear/src/main/res/values/strings.xml
index cf78cc7339..a83cb9bacd 100644
--- a/wear/src/main/res/values/strings.xml
+++ b/wear/src/main/res/values/strings.xml
@@ -136,8 +136,8 @@
white
black
multicolor
- Simplify Charging UI
- Only show time and BG when charging
+ Simplify UI
+ Only show time and BG
Vibrate hourly
diff --git a/wear/src/main/res/xml/preferences.xml b/wear/src/main/res/xml/preferences.xml
index 528d8bf00a..919787dec7 100644
--- a/wear/src/main/res/xml/preferences.xml
+++ b/wear/src/main/res/xml/preferences.xml
@@ -5,16 +5,16 @@
@@ -24,7 +24,7 @@
android:summary="Show BG."
android:title="@string/pref_show_bg"
app:wear_iconOff="@drawable/settings_off"
- app:wear_iconOn="@drawable/settings_on"/>
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
-
-
+ app:wear_iconOn="@drawable/settings_on" />
-
-
@@ -128,7 +124,7 @@
android:summary="Wizard from watch possible"
android:title="@string/pref_wizard_in_menu"
app:wear_iconOff="@drawable/settings_off"
- app:wear_iconOn="@drawable/settings_on"/>
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
-
-
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
-
\ No newline at end of file
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_bigchart.xml b/wear/src/main/res/xml/watch_face_configuration_bigchart.xml
index 7953823134..a5f5010bdc 100644
--- a/wear/src/main/res/xml/watch_face_configuration_bigchart.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_bigchart.xml
@@ -9,12 +9,13 @@
android:summary="Dark theme"
android:title="@string/pref_dark"
app:wear_iconOff="@drawable/settings_off"
- app:wear_iconOn="@drawable/settings_on"/>
+ app:wear_iconOn="@drawable/settings_on" />
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_circle.xml b/wear/src/main/res/xml/watch_face_configuration_circle.xml
index 440b527bfa..1943d72b0f 100644
--- a/wear/src/main/res/xml/watch_face_configuration_circle.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_circle.xml
@@ -8,7 +8,7 @@
android:summary="Dark theme"
android:title="@string/pref_dark"
app:wear_iconOff="@drawable/settings_off"
- app:wear_iconOn="@drawable/settings_on"/>
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
-
+ app:wear_iconOn="@drawable/settings_on" />
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_cockpit.xml b/wear/src/main/res/xml/watch_face_configuration_cockpit.xml
index 2e8ef3c100..bd87348acb 100644
--- a/wear/src/main/res/xml/watch_face_configuration_cockpit.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_cockpit.xml
@@ -3,18 +3,18 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
-
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_digitalstyle.xml b/wear/src/main/res/xml/watch_face_configuration_digitalstyle.xml
index d03498d32b..6e33c5d610 100644
--- a/wear/src/main/res/xml/watch_face_configuration_digitalstyle.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_digitalstyle.xml
@@ -4,59 +4,59 @@
+ android:entryValues="@array/digitalstyle_styles_values"
+ android:key="digitalstyle_frameStyle"
+ android:title="@string/digitalstyle_pref_your_style" />
+ android:entryValues="@array/digitalstyle_color_values"
+ android:key="digitalstyle_frameColor"
+ android:title="@string/digitalstyle_pref_your_color" />
+ android:entryValues="@array/digitalstyle_color_saturation"
+ android:key="digitalstyle_frameColorSaturation"
+ android:title="@string/digitalstyle_pref_your_color_saturation" />
+ android:entryValues="@array/digitalstyle_color_opacity_value"
+ android:key="digitalstyle_frameColorOpacity"
+ android:title="@string/digitalstyle_pref_your_color_opacity" />
-
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_home.xml b/wear/src/main/res/xml/watch_face_configuration_home.xml
index fbe3015eab..a471c8a816 100644
--- a/wear/src/main/res/xml/watch_face_configuration_home.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_home.xml
@@ -8,7 +8,7 @@
android:summary="Dark theme"
android:title="@string/pref_dark"
app:wear_iconOff="@drawable/settings_off"
- app:wear_iconOn="@drawable/settings_on"/>
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
-
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_home2.xml b/wear/src/main/res/xml/watch_face_configuration_home2.xml
index efc27df610..be883d2f76 100644
--- a/wear/src/main/res/xml/watch_face_configuration_home2.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_home2.xml
@@ -32,12 +32,12 @@
app:wear_iconOff="@drawable/settings_off"
app:wear_iconOn="@drawable/settings_on" />
-
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_largehome.xml b/wear/src/main/res/xml/watch_face_configuration_largehome.xml
index fbe3015eab..a471c8a816 100644
--- a/wear/src/main/res/xml/watch_face_configuration_largehome.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_largehome.xml
@@ -8,7 +8,7 @@
android:summary="Dark theme"
android:title="@string/pref_dark"
app:wear_iconOff="@drawable/settings_off"
- app:wear_iconOn="@drawable/settings_on"/>
+ app:wear_iconOn="@drawable/settings_on" />
+ app:wear_iconOn="@drawable/settings_on" />
-
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_nochart.xml b/wear/src/main/res/xml/watch_face_configuration_nochart.xml
index dc5b99cf8c..a8d78f9d7c 100644
--- a/wear/src/main/res/xml/watch_face_configuration_nochart.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_nochart.xml
@@ -8,13 +8,14 @@
android:summary="Dark theme"
android:title="@string/pref_dark"
app:wear_iconOff="@drawable/settings_off"
- app:wear_iconOn="@drawable/settings_on"/>
+ app:wear_iconOn="@drawable/settings_on" />
+
diff --git a/wear/src/main/res/xml/watch_face_configuration_steampunk.xml b/wear/src/main/res/xml/watch_face_configuration_steampunk.xml
index 0b7358c1f6..e3933b6732 100644
--- a/wear/src/main/res/xml/watch_face_configuration_steampunk.xml
+++ b/wear/src/main/res/xml/watch_face_configuration_steampunk.xml
@@ -11,18 +11,18 @@
android:title="@string/pref_delta_granularity" />
-
+