mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-20 23:28:31 +02: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