Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How make transparent AppCompat style?

My activity style must be from AppCompat theme.

So I make custom style and set activity style in manifest.

But black background is shown.

Below is custom theme

<style name="TransparentTheme" parent="@style/Theme.AppCompat">

    <item name="android:background">@null</item>
    <item name="background">@null</item>

    <item name="android:windowBackground">@null</item>
    <item name="android:colorBackgroundCacheHint">@null</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowAnimationStyle">@null</item>
</style>
like image 299
ChangUZ Avatar asked Mar 06 '14 08:03

ChangUZ


1 Answers

use @android:color/transparent instead of @null

like image 114
Imtiyaz Khalani Avatar answered Oct 18 '22 11:10

Imtiyaz Khalani