从appcompat v21中删除窗口背景

时间:2014-10-29 13:57:18

标签: android android-appcompat

我的应用程序中有很多透支,导致我完全禁用窗口背景。升级到appcompat v21后,decorview再次具有纯色背景(其primaryColor)。我尝试了以下方法来禁用它:

<style name="AppBaseTheme" parent="Theme.Guidantswhite">
        <item name="android:windowBackground">@null</item>
</style>

或在我的基本主题中:

<style name="Theme.Guidantswhite" parent="@style/Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:colorBackgroundCacheHint">@null</item>
    <item name="android:windowIsTranslucent">true</item>
    <!-- Main theme colors -->
    <!--   your app's branding color (for the app bar) -->
    <item name="colorPrimary">@color/bgo_highlight</item>
</style>

会感激任何指示。

1 个答案:

答案 0 :(得分:0)

在我的代码中,我为decorview发送了背景,以便将其设置为状态栏。也许你有相同的功能?