work around the renderer

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/27/head
androidacy-user 3 years ago
parent f39b3af4fa
commit ec777e3d8e

@ -27,9 +27,6 @@ import java.util.Objects;
public class SetupActivity extends FoxActivity implements LanguageActivity {
private ActivitySetupBinding binding;
private boolean mSupportsDarkText;
@SuppressLint({"ApplySharedPref", "RestrictedApi"})
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -56,7 +53,7 @@ public class SetupActivity extends FoxActivity implements LanguageActivity {
break;
}
binding = ActivitySetupBinding.inflate(getLayoutInflater());
com.fox2code.mmm.databinding.ActivitySetupBinding binding = ActivitySetupBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
// Show setup box. Put the setup_box in the main activity layout
View view = binding.setupBox;
@ -142,6 +139,10 @@ public class SetupActivity extends FoxActivity implements LanguageActivity {
break;
case "transparent_light":
setTheme(R.style.Theme_MagiskModuleManager_Transparent_Light);
// restart the activity because switching to transparent pisses the rendering engine off
Intent intent = getIntent();
finish();
startActivity(intent);
break;
}
}, 100);

@ -190,13 +190,10 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
findPreference("pref_enable_blur").setSummary(R.string.blur_disabled_summary);
}
themePreference.setSummaryProvider(p -> themePreference.getEntry());
themePreference.setOnPreferenceClickListener(p -> {
themePreference.setOnPreferenceChangeListener((preference, newValue) -> {
// You need to reboot your device at least once to be able to access dev-mode
if (devModeStepFirstBootIgnore || !MainApplication.isFirstBoot())
devModeStep = 1;
return false;
});
themePreference.setOnPreferenceChangeListener((preference, newValue) -> {
if (BuildConfig.DEBUG) {
Log.d(TAG, "Theme changed, refreshing activity. New value: " + newValue);
}
@ -226,6 +223,9 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
MainApplication.getINSTANCE().updateTheme();
FoxActivity.getFoxActivity(this).setThemeRecreate(MainApplication.getINSTANCE().getManagerThemeResId());
}, 1);
Intent intent = new Intent(requireContext(), SettingsActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}).setNegativeButton(R.string.cancel, (dialog, which) -> {
// Revert to system theme
((ListPreference) findPreference("pref_theme")).setValue("system");

Loading…
Cancel
Save