2016-12-19 35 views
0

大家好我有一個問題,我可以刪除這個bar或覆蓋它嗎? 它anoying當我回到應用程序它顯示的酒吧,當我打開app然後它的正常。可以有人幫助我嗎?它的方式來覆蓋頂部的酒吧或刪除它?

我搜索了周圍的互聯網,我無法找到任何關於它的問題來刪除頂部的小酒吧。 當你能幫助我時,請把它寫下來。

這裏是清單代碼:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.example.minecraft_pc.test"> 
<uses-permission android:name="android.permission.INTERNET" /> 
<application 
    android:allowBackup="true" 
    android:icon="@mipmap/ic_launcher" 
    android:label="@string/app_name" 
    android:supportsRtl="true" 
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"> 
    <activity 
     android:name=".FullscreenActivity" 
     android:configChanges="orientation|keyboardHidden|screenSize" 
     android:label="@string/app_name" 
     android:theme="@style/FullscreenTheme"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
</application> 
</manifest> 

回答

0

嘗試做到這一點編程:

// as the doc page says, this is a solution for Android > 4.1 
    View view= getWindow().getDecorView(); 
    int flagOption = View.SYSTEM_UI_FLAG_FULLSCREEN; 
    view.setSystemUiVisibility(flagOption); 

您可以檢查relative doc page

+0

我把它粘貼在oncreate()中,但它不工作。 –

+0

我想通了:D –

+0

你使用的是操作欄嗎?你能粘貼你應用於活動的主題嗎? @風格/ FullScreenTheme? – MikeKeepsOnShine