2

I want to use transparent theme in one of my activities

I have tried this :

<style name="Theme.Transparent"  parent="android:Theme">
     <item name="android:windowIsTranslucent">true</item>
     <item name="android:windowBackground">@android:color/transparent</item>
     <item name="android:windowContentOverlay">@null</item>
     <item name="android:windowNoTitle">true</item>
     <item name="android:windowIsFloating">true</item>
     <item name="android:backgroundDimEnabled">false</item>
</style>

it works fine in pre lollipop but in lollipop it doesn't work (force close)

then i have tried this one :

android:theme="@android:style/Theme.Translucent"

it doesn't works in pre 21 and 21

so please help to fix this problem.

Mahdi Nouri
  • 1,391
  • 14
  • 29
  • 1
    Use LogCat to examine the Java stack trace associated with your crash: https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this – CommonsWare Aug 25 '15 at 13:41

2 Answers2

0

Put in your layout

android:alpha="0.00"

It works

Sumit Pathak
  • 529
  • 2
  • 7
  • 24
0

finally I have fixed this issue

I just set color primary - accent - and primary dark to this theme and it works perfect :)

Mahdi Nouri
  • 1,391
  • 14
  • 29