mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-02 02:04:48 +12:00
fixes
This commit is contained in:
parent
84f1ee2c16
commit
135ee77c6e
1 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,7 @@ import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.preference.SwitchPreference;
|
import androidx.preference.SwitchPreference;
|
||||||
|
import com.google.android.material.color.DynamicColors;
|
||||||
|
|
||||||
import com.panda3ds.pandroid.R;
|
import com.panda3ds.pandroid.R;
|
||||||
import com.panda3ds.pandroid.app.BaseActivity;
|
import com.panda3ds.pandroid.app.BaseActivity;
|
||||||
|
@ -37,6 +38,10 @@ public class AppearancePreferences extends BasePreferenceFragment {
|
||||||
|
|
||||||
private void refresh() {
|
private void refresh() {
|
||||||
((SwitchPreference) findPreference("dynamic_colors")).setChecked(GlobalConfig.get(GlobalConfig.KEY_DYNAMIC_COLORS));
|
((SwitchPreference) findPreference("dynamic_colors")).setChecked(GlobalConfig.get(GlobalConfig.KEY_DYNAMIC_COLORS));
|
||||||
|
if (!DynamicColors.isDynamicColorAvailable(this)) {
|
||||||
|
((SwitchPreference) findPreference("dynamic_colors")).setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue