i was just wondering if there was a simple way to see if an application running on android is currently in full screen. is there a way to query android to see if you're currently in full screen mode or something like that?
Using Android Studio (current version is 2.2. 2 at moment) is very easy to add a fullscreen activity. See the steps: Right click on your java main package > Select “New” > Select “Activity” > Then, click on “Fullscreen Activity”.
Full! screen lets you hide the system navigation bar and notification area on your Android phone or tablet so you can use that space for apps and games in full screen mode. It's not just crashing your system UI, though. Full! screen places minimalist replacement buttons tucked away in the corners.
Just to complete on Sigwann answer:
boolean fullScreen = (getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0;
boolean forceNotFullScreen = (getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN) != 0;
boolean actionbarVisible = getActionBar().isShowing();
I guess Commonsware wanted to say getWindow().getAttributes() and not getWindow().getFlags(); since getFlags does not exist as far as I know. At least it is not in doc.
you need to read getWindow().getAttributes().flags, which is an int.
WindowManager.LayoutParams lp = getWindow().getAttributes(); int i = lp.flags;
FLAG_FULLSCREEN = 1024 according to android documentation. so your flag is the 11th bite of lp.flags
if this bite = 1, full screen is activated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With