In my application, I am currently using windowManager.getDefaultDisplay () to determine the screen size.
With the new Samsung S8 navigation bar, which can be shown and hidden with a “dot” in the lower left corner, I get the same display size for the displayed or hidden navigation bar. It always returns the size of the display, as if the navigation bar is being displayed - I expect to get 1080x2220 when the navigation bar is hidden, but always gets 1080x2076.
Is there any way to distinguish cases programmatically and get the correct screen sizes so that I can correctly display my application?
source share