I have a phonegap 3.0.0 application. My application covers the status bar (the thing with the clock, reception info, etc). Since i'm not a full screen game, this is not desirable.
I believe it's running as a "Full Screen" app.
I've found posts here on stack to do the opposite (ie make an app go full screen) and did the inverse of what was suggested. I'm wondering if something changed in PhoneGap or perhaps the PhoneGap CLI that I used to create the project because my app is showing fullscreen.
I tried this:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
super.loadUrl(Config.getStartUrl(), 10000);
}
Which explicitly tells it to NOT be in full screen mode.... but it still shows up full screen.
The native code suggested above will work, but a cleaner way would be just to make sure you don't have in the config.xml:
<preference name="fullscreen" value="true" />
you can also set it to "false", but its actually the default value so its not necessary. works for me.
I figured it out.
The Splashscreen plugin must be setting it to fullscreen.
By calling the clearFlags
method AFTER super.loadUrl
, once the app loads the status bar shows up.
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl(Config.getStartUrl(), 10000);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
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