Created
April 4, 2019 10:23
-
-
Save MartinZikmund/441b8c866eb2b641c6e6c4a98d5d9219 to your computer and use it in GitHub Desktop.
This file contains 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
partial void Initialize() | |
{ | |
UpdateProperties(); | |
} | |
private void UpdateProperties() | |
{ | |
var realDisplayMetrics = new DisplayMetrics(); | |
var windowManager = ContextHelper.Current.GetSystemService(Context.WindowService).JavaCast<IWindowManager>(); | |
windowManager.DefaultDisplay.GetRealMetrics(realDisplayMetrics); | |
UpdateRawProperties(realDisplayMetrics); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment