mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-12 09:48:55 +00:00
ui: dark theme support, setup by default from system, settings
This commit is contained in:
@@ -353,4 +353,10 @@ public class MainActivity extends GameActivity {
|
||||
intent.setType("image/*");
|
||||
startActivity(Intent.createChooser(intent, "Share image"));
|
||||
}
|
||||
|
||||
// Check if device is using dark theme.
|
||||
public boolean useDarkTheme() {
|
||||
int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||
return currentNightMode == Configuration.UI_MODE_NIGHT_YES;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user