When I get the screen size for my Android app, it returns a variable which in every case is too large for the screen to display. I use the following code to get screen size.
final int windowHeight = getResources().getDisplayMetrics().heightPixels;
final int windowWidth = getResources().getDisplayMetrics().widthPixels;
Is there any way to compensate for it? Or to even fix my problem?
Also, is there a way to turn the battery/time bar off in the app? I think that might be the reason I’m having trouble, but I don’t actually know. That’s why I am asking.
To disable the battery/time bar, I use this in my
AndroidManifest.xmlfile, for the<application>tag :And, to get the screen’s size, here’s what I have in my
Activity: