Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to get REAL screen dimensions of the device in pixels?

$
0
0

In my App.xaml.cs file I use this:

var device = Resolver.Resolve();
var displayHeight = device.Display.Height;
var displayWidth = device.Display.Width;

But whenever the device has software navigation buttons instead of hardware ones (you know, like these Android), the screen height value is cut by the height of those buttons

So for example instead of returning 1080x1920, that method returns 1080x1812

Is there any way to get real screen height value without navi button height being subtracted?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>