简体   繁体   English

android-错误状态栏和导航栏透明

[英]android - Bug Status Bar and navigation Bar TRANSPARENT

I have a problem with the translucent statusbar only when opening of the app for the first time. 仅在首次打开应用程序时,半透明状态栏才出现问题。 Take a look at the screenshot: 看一下屏幕截图:

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

Here is the XML of the Style I use which is including the translucent Status Bar: 这是我使用的样式的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>

and my theme: 和我的主题:

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

</style>

Put this inside your activity tag in the manifest. 将其放在清单的活动标签内。 This'll ensure that the app opens full screen. 这样可以确保该应用全屏打开。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM