문제

I want to switch between full screen mode and normal mode while my app is running.

is there any phonegap plugin to do this for me (Android) ?

if no, Please tell me how can I switch between full screen and normal in java, called in javascript.

도움이 되었습니까?

해결책 2

It's possible to do using this plugin: https://github.com/mesmotronic/cordova-plugin-fullscreen

it has functions AndroidFullScreen.showSystemUI, AndroidFullScreen.leanMode, AndroidFullScreen.immersiveMode to do the switch.

다른 팁

Try the following method. It displays full screen.

Set Fullscreen as following method.

call this method before "super.LoadURL("....");"

    //Fullscreen (No title bar and status bar) 
    public void setFullscreen() {  
         getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);  //Clean FLAG  
         requestWindowFeature(Window.FEATURE_NO_TITLE);  
         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  
                        WindowManager.LayoutParams.FLAG_FULLSCREEN);  
    } 

Clean FLAG "FLAG_FORCE_NOT_FULLSCREEN". This is supported by DroidGap.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top