From d0945be5217f20616df50e8f7e55046851841f9b Mon Sep 17 00:00:00 2001 From: rICTx-T1D Date: Fri, 13 Nov 2020 21:46:30 +0100 Subject: [PATCH] Notice in global settings to find more settings in Watchface configuration... --- .../utils/WatchfaceSettingsPreference.java | 32 +++++++++++++++++++ wear/src/main/res/values/strings.xml | 3 ++ wear/src/main/res/xml/preferences.xml | 7 ++++ 3 files changed, 42 insertions(+) create mode 100644 wear/src/main/java/info/nightscout/androidaps/interaction/utils/WatchfaceSettingsPreference.java diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WatchfaceSettingsPreference.java b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WatchfaceSettingsPreference.java new file mode 100644 index 0000000000..1f23543d41 --- /dev/null +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WatchfaceSettingsPreference.java @@ -0,0 +1,32 @@ +package info.nightscout.androidaps.interaction.utils; + +import android.content.Context; +import android.util.AttributeSet; +import android.widget.Toast; + +import androidx.annotation.NonNull; + +import preference.WearListPreference; + + +public class WatchfaceSettingsPreference extends WearListPreference { + private String pref_moreWatchfaceSettings,pref_lookInYourWatchfaceConfiguration; + + public WatchfaceSettingsPreference(Context context, AttributeSet attrs) { + super(context, attrs); + + this.pref_moreWatchfaceSettings =context.getResources().getString(context.getResources().getIdentifier("pref_moreWatchfaceSettings", "string", context.getApplicationContext().getPackageName())); + this.pref_lookInYourWatchfaceConfiguration=context.getResources().getString(context.getResources().getIdentifier("pref_lookInYourWatchfaceConfiguration", "string", context.getApplicationContext().getPackageName())); + + entries = new CharSequence[]{pref_moreWatchfaceSettings}; + entryValues = new CharSequence[]{""}; + } + + @Override public CharSequence getSummary(@NonNull final Context context) { + return ""; + } + @Override + public void onPreferenceClick(@NonNull Context context) { + Toast.makeText(context, pref_lookInYourWatchfaceConfiguration, Toast.LENGTH_LONG).show(); + } +} diff --git a/wear/src/main/res/values/strings.xml b/wear/src/main/res/values/strings.xml index 220c3b7808..4685ce2a08 100644 --- a/wear/src/main/res/values/strings.xml +++ b/wear/src/main/res/values/strings.xml @@ -67,6 +67,9 @@ Complication Tap Action Unicode in Complications Version: + more Watchface settings + Look into Watchface configuration, please. + TempT Wizard diff --git a/wear/src/main/res/xml/preferences.xml b/wear/src/main/res/xml/preferences.xml index a65b6e69e9..df1163debe 100644 --- a/wear/src/main/res/xml/preferences.xml +++ b/wear/src/main/res/xml/preferences.xml @@ -187,6 +187,13 @@ android:summary="Input Design" android:title="@string/pref_version" /> +