I have been trying to get the status bar to go away as i want to put a fullscreen game in. i'm using phonegap for the iphone
thanks in advance.
This lesson describes how to hide the status bar on different versions of Android. Hiding the status bar (and optionally, the navigation bar) lets the content use more of the display space, thereby providing a more immersive user experience.
For iPhone simply add
<key>UIStatusBarHidden</key>
<true />
in your [appname]-info.plist file
For completeness if you also wish to roll out for android this solution worked well
In the file where you change activity to droidgap
public class app extends DroidGap
Add the following import
import android.view.WindowManager;
And then append the following within the class method
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.loadUrl("file:///android_asset/www/index.html");
}
Hope this helps
regards
If you want to the app to load with the status bar initially hidden:
"Status bar is initially hidden" is the key that is available at least in xcode 4.2 beta 5.
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