Setting a background drawable for a dialog?

Posted by user291701 on Stack Overflow See other posts from Stack Overflow or by user291701
Published on 2010-03-11T17:15:31Z Indexed on 2010/03/11 17:19 UTC
Read the original article Hit count: 166

Filed under:
|

Hi,

Tried posting this at android dev, wanted to go here too in case anyone knows. I'm trying to supply a custom background drawable for a dialog. I've created the following in my styles.xml file:

 <style name="CustomDlg" parent="@android:style/Theme.Dialog"> 
   <item name="android:windowBackground">@drawable/my_background</item> 
 </style> 

This works fine on 1.6+. On my g1 running 1.5 (and the 1.5 emulator) the drawable is used, but the area around the dialog is opaque black instead of being translucent.

Is there something I'm missing here, or is this a bug with 1.5? Any work arounds? Is 1.5 just the ie6 of Android?

Thanks

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk