【问题标题】:Full-Screen-Transculent mode shows empty status bar which should be hidden全屏半透明模式显示应隐藏的空白状态栏
【发布时间】:2014-08-06 10:04:11
【问题描述】:

如图所示,顶部有一个黑条。
有人想隐藏它吗?

styles.xml(默认)

<resources>
    <style name="AppTheme" parent="AppBaseTheme"></style>
    <style name="AppBaseTheme" parent="@android:style/Theme.Holo.Light"></style>
    <style name="AppBaseTheme.Transculent" parent="@style/Theme.Holo.Light.Transculent"></style>
    <style name="Theme.Holo.Light.Transculent" parent="android:Theme.Holo.Light">
        <item name="android:background">@android:color/transparent</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowIsTranslucent">true</item>
    </style>
    <style name="Theme.Holo.Light.DarkActionBar.Transculent" parent="android:Theme.Holo.Light.DarkActionBar">
        <item name="android:background">@android:color/transparent</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowIsTranslucent">true</item>
    </style>
</resources>

【问题讨论】:

    标签: android android-layout android-xml statusbar


    【解决方案1】:

    你试过了吗:

        <style name="MyTranslucentStatusTheme">
            <item name="android:windowTranslucentStatus">true</item>
        </style>
    

    这需要进入 values-v19/styles.另请查看https://developer.android.com/training/system-ui/status.html

    【讨论】:

      猜你喜欢
      • 2015-04-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-20
      • 1970-01-01
      • 2018-05-31
      • 2011-02-22
      • 1970-01-01
      • 2016-04-18
      相关资源
      最近更新 更多