diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/AAPSPreferences.java b/wear/src/main/java/info/nightscout/androidaps/interaction/AAPSPreferences.java index 6142937206..39dda741fd 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/AAPSPreferences.java +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/AAPSPreferences.java @@ -2,7 +2,8 @@ package info.nightscout.androidaps.interaction; import android.os.Bundle; -import android.preference.PreferenceActivity; +import android.view.View; +import android.view.ViewGroup; import info.nightscout.androidaps.R; import preference.WearPreferenceActivity; @@ -13,6 +14,9 @@ public class AAPSPreferences extends WearPreferenceActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); + ViewGroup view = (ViewGroup)getWindow().getDecorView(); + removeBackgroundRecursively(view); + view.setBackground(getResources().getDrawable(R.drawable.settings_background)); } @Override @@ -21,4 +25,15 @@ public class AAPSPreferences extends WearPreferenceActivity { finish(); } + void removeBackgroundRecursively(View parent) { + if (parent instanceof ViewGroup) { + ViewGroup group = (ViewGroup)parent; + for (int i = 0; i < group.getChildCount(); i++) { + removeBackgroundRecursively(group.getChildAt(i)); + } + } + parent.setBackground(null); + } + + } \ No newline at end of file diff --git a/wear/src/main/res/drawable/settings_background.xml b/wear/src/main/res/drawable/settings_background.xml new file mode 100644 index 0000000000..97632802ac --- /dev/null +++ b/wear/src/main/res/drawable/settings_background.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file