In my app I am currently using windowManager.getDefaultDisplay() to determine the screen size.
With the new Samsung S8 navigation bar, that can be shown and hidden using a 'dot' on the bottom left, I get the same display size for navigation bar shown or hidden. It always returns the display size as if the navigation bar is shown - I expect to get 1080x2220 when the navigation bar is hidden, but always gets 1080x2076.
Is there any way I can distinguish the cases programmatically and obtain the correct screen dimensions so I can display my app correctly?
getNavigationBar()
) and check ifisVisible()
or not? If so, can you get the height of the navbar and add it to the screen? Or is the navbar area "restricted" in some way regardless of visibility? – Tomboy