I was wondering if anyone knows a simple way to get the height and width of an android screen size using c# in Xamarin. I need to get the screen size so that I can use it in one of my adapter classes. I have tried using the display and the IWindowManager but without success. Any help or a point in the right direction would be much appreciated. Thanks in advance!!
The answer that worked best for me was using
var metrics = Resources.DisplayMetrics;
Thank you all for your help!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With