Notice in global settings to find more settings in Watchface configuration...

This commit is contained in:
rICTx-T1D 2020-11-13 21:46:30 +01:00 committed by mh
parent 509cd0baf2
commit d0945be521
3 changed files with 42 additions and 0 deletions

View file

@ -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();
}
}

View file

@ -67,6 +67,9 @@
<string name="pref_complication_tap_action">Complication Tap Action</string>
<string name="pref_unicode_in_complications">Unicode in Complications</string>
<string name="pref_version">Version:</string>
<string name="pref_moreWatchfaceSettings">more Watchface settings</string>
<string name="pref_lookInYourWatchfaceConfiguration">Look into Watchface configuration, please.</string>
<string name="menu_tempt">TempT</string>
<string name="menu_wizard">Wizard</string>

View file

@ -187,6 +187,13 @@
android:summary="Input Design"
android:title="@string/pref_version" />
<info.nightscout.androidaps.interaction.utils.WatchfaceSettingsPreference
android:defaultValue="1"
android:entries="@array/input_design"
android:entryValues="@array/input_design_values"
android:key="more_settings"
android:summary="Input Design"
android:title="@string/pref_moreWatchfaceSettings" />
<!--<CheckBoxPreference