2016-04-15 13 views
6

ステータスバーを削除すると、キーボードを開くたびに( または通知が届く)バグがあります。ステータスバーCordovaを非表示にする

App.run(function($ionicPlatform) { 
     $ionicPlatform.ready(function() { 
      if(window.StatusBar) {  
      StatusBar.hide(); 
      } 
     }); 
    }); 

enter image description here Image1

任意の提案?ありがとうございました!

+0

「コードワプラグイン」の出力は何ですか?最新バージョンを試しましたか? 'codeovaプラグインrm statusbar && cordova plugin add https:// github.com/apache/cordova-plugin-statusbar' – daserge

+0

ステータスバープラグインのバージョン2.1.2 – user40101121

+0

マスターバージョンは同じ方法で動作しますか? – daserge

答えて

8

更新日:

実際には、githubの上でコミットされていると2.1.4+(つまり、あなたが必要としないバージョンに上陸する必要がありコルドバ - プラグインステータスバーの修正があります私の元の答えのような追加のプラグインが記載されています)。私は固定

:など

オリジナル回答の入力と対話するときにステータスバーが今隠し滞在する必要があり、最新のコルドバ - プラグイン - ステータスバー今、タイプ

cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git 

に、キーボードを取得するにはプラグイン付きでcordova-plugin-fullscreen

cordova plugin add cordova-plugin-fullscreen 

次に、入力と対話しながら、

StatusBar.hide(); 
if (typeof AndroidFullScreen !== 'undefined') { // Fullscreen plugin exists ? 
    function errorFunction(error) { console.error(error); } 
    AndroidFullScreen.isSupported(AndroidFullScreen.immersiveMode, errorFunction); 
} 

ImmersiveModeが、それは隠し続け、キーボードなど

注:devicereadycordova-plugin-fullscreenドキュメントごとに、この方法は、唯一のAndroid 4.4以降でサポートされています。 Android 4.0以降では「リーンモード」もありますが、これは対話中のステータスバーを表示します(理想的ではありません)

+0

完璧に働いてくれてありがとう – RoccoLacatus

+0

は魅力的に働いた! – arielf

関連する問題