2016-11-08 12 views
0

Appcelerator TitaniumのAndroid下部ナビゲーションを永久に隠すことはできますか?この件について多くの質問がありますが、解決策はありません。appceleratorチタン - hide navigation barアンドロイド

<fullscreen> true </fullscreen> 
in tiapp doesn't work with titanium 5.5.1 

$.index.addEventListener('open', function(e) { $.index.activity.actionBar.hide();}); 
doesn't work. 

'Window':{navBarHidden:true,tabBarHidden:true,fullscreen:true} in tss 
doesn't work etc. 

ありがとうございます。

答えて

0

このメソッドは常に私のために働いて、ナビゲーションバーとタブバーなしでフルスクリーンにアプリを設定します。

メインウィンドウのIDが設定されていないか「インデックス」、これだけは、それはあなたが試したアプローチですが、動作するはずに設定されていると仮定すると:あなたのapp.tssやindex.tssで

$.index.addEventListener('open', function(e) { 

    $.index.activity.actionBar.hide(); 
}); 

:あなたのtiapp.xmlで

"Window":{ 
    navBarHidden:true, 
    tabBarHidden:true, 
    fullscreen:true 
} 

<fullscreen>true</fullscreen> 
<navbar-hidden>true</navbar-hidden> 

それはまだ同じ問題が、(Tを指定し、これを追加しようtiapp.xml内のマニフェストセクションのアプリケーションやアクティビティタグへのヘム):

android:theme="@style/Theme.NoActionBar" 

追加情報:

app.tss: global styles 
index.tss: style for the index view 

任意のスタイルがある場合、ウィンドウのIDは、正しいかどうかを確認します偽装されたものを上書きする。

あなたはすべてのアクションバーの参照が存在するかどうかを確認でき、窓openメソッドの内部ではconsole.logを追加します。

if($.index) { 

    console.log("window"); 

    if($.index.activity) { 

     console.log("activity"); 

     if($.index.activity.actionBar) { 

      console.log("action bar"); 

      if($.index.activity.actionBar.hide) { 

       console.log("hide - try to hide"); 

       $.index.activity.actionBar.hide(); 
      } 
     } 
    } 
} 

は、Appceleratorのブログでこの記事をチェックアウト:Hiding the Android ActionBar

あなたが」 Soft Navigation Barを隠そうとしているのですが、私はそのオプションとしてTitanium SDKを知りませんが、あなたのような質問に答えると、Fokke Zandbergenは次のようにコメントしています:

What you want is possible since Titanium 5.2 by using <fullscreen>true</fullscreen> in tiapp.xml. 

Android Documentation: Using Immersive Full-Screen Mode

Appcelerator Documentation: Hide Soft Navigation Bar

このすべては、あなたが以下のモジュールを試みることができる動作しない場合:また、他の質問で見

Appcelerator Module - Marketplace (free): Immersive view

How to hide the soft navigation bar on Android with Titanium?

+0

はありがとうリカルド、 –

+0

Ricardoありがとう、私はあなたのすべてのアドバイスに続き、コンソールは正しい答えを返しました: [INFO] :ウィンドウ [INFO]:アクティビティ [INFO]:アクションバー [INFO]:非表示 - を隠そう[WARN]:ActionBarProxy:(メイン)[1593,1593]アクションバーが しかし、Androidのナビゲーションが有効になっていませんバーはまだ表示されています。 –

+0

Androidバージョン:4.4.2 –

関連する問題