public static void loadColorSchemeFromPreferences(@NonNull Context context) { String path = android.preference.PreferenceManager.getDefaultSharedPreferences(context) .getString(PREF_COLOR_SCHEME, PREF_COLOR_SCHEME_D); Properties p = loadColorScheme(path, context.getAssets()); if (p == null) Toast.makeText( context, context.getString(R.string.pref_theme_loading_error, path), Toast.LENGTH_SHORT) .show(); else ColorScheme.set(new ColorScheme(p)); }