Created
July 23, 2020 13:46
-
-
Save DelphiWorlds/86313c1f94cbe21e29e1e5a38adbc208 to your computer and use it in GitHub Desktop.
Check Android for dark mode (untested)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses | |
Androidapi.JNI.GraphicsContentViewText, Androidapi.Helpers; | |
function IsDarkMode: Boolean; | |
var | |
LMode: Integer; | |
begin | |
LMode := TAndroidHelper.Context.getResources.getConfiguration.uiMode and TJConfiguration.JavaClass.UI_MODE_NIGHT_MASK; | |
Result := LMode = TJConfiguration.JavaClass.UI_MODE_NIGHT_YES; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment