I am trying to create an app that will run on both PC (Windows) and Android, however, I am having issues getting the correct screen size on both.
On Windows, the Screen.getBounds() method seems to always return the correct full screen size (i.e. the screen without the taskbar space etc). On Android, using Screen.getBounds() will return a screen size which is much larger than the actual screen size. The only way I can get my app to work correctly on android is to use Screen.getVisualBounds(). However, on Windows, using Screen.getVisualBounds() always returns a size slightly smaller in height than the actual total screen size since it removes the space occupied by the taskbar.
Does anyone know why the Screen.getBounds() returns a much higher value on Android than the actual visible screen?
Thanks.