2014-06-26 37 views
0

僅當第一次打開應用程序時,我遇到半透明狀態欄的問題。看看截圖:android-錯誤狀態欄和導航欄TRANSPARENT

http://i1335.photobucket.com/albums/w673/ductruongcntt/Screenshot_2014-06-26-14-17-26_zps1e9a56f4.png

這裏是風格的XML我使用的是包括半透明的狀態欄:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:clipToPadding="false" 
android:fitsSystemWindows="true" 
android:orientation="vertical" > 

<com.viewpagerindicator.PagerSlidingTabStrip 
    android:id="@+id/indicatorTabHome" 
    android:layout_width="match_parent" 
    android:layout_height="40dp" 
    android:clipToPadding="false" 
    android:fitsSystemWindows="true" > 
</com.viewpagerindicator.PagerSlidingTabStrip> 

<android.support.v4.view.ViewPager 
    android:id="@+id/vpMain" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" > 
</android.support.v4.view.ViewPager> 

和我的主題:

<style name="MyTheme" parent="@android:style/Theme.Holo.Light"> 
    <item name="android:windowContentOverlay">@null</item> 
    <item name="android:windowTranslucentStatus">true</item> 

</style> 
+0

謝謝。我希望我的應用程序透明狀態欄 – user3778262

回答

0

把它放在清單中的活動標籤中。這將確保應用程序打開全屏。

android:label="@string/app_name" 
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"