How do you hide notification/title bar in an AS3/Air Android App?
I'm using FlashDevelop to create a simple Adobe AS3/Air game for Android and can't figu开发者_如何学JAVAre out how to hide the notification bar. I'm sure it's something easy that I'm missing.
In the application xml file, you need to set the <fullScreen>
xml element to true:
<application>
...
<initialWindow>
...
<fullScreen>true</fullScreen>
...
</initialWindow>
...
</application>
Follow these simple steps and get hide notification bar
Modify main Windowed Application tag as below:
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" showNotificationbar="false" showTitleBar="false">
Open AIR application’s configuration xml file that gets generated automatically while creating new application.
uncomment this line. Change should look like below:
<systemChrome></systemChrome>
Modify the above mentioned line to match the following:
<systemChrome>none</systemChrome>
That's it….
If you are using starling, you can also call this during runtime:
Starling.current.nativeStage.displayState = StageDisplayState.FULL_SCREEN;
In starling, when you lose application context (e.g. while using CameraRoll), status bar may be shown even if you have following lines in your app-description xml:
<fullScreen>true</fullScreen>
<systemChrome>none</systemChrome>
Solution of this, is to call same line again after losing context:
Starling.current.nativeStage.displayState = StageDisplayState.FULL_SCREEN;
Hope it helps.
精彩评论