0

There is problem with my styles. I would like prepare AlertDialog totaly colered in yellow without shadow. Here is code below:

 AlertDialog.Builder alert = new AlertDialog.Builder(About.this, R.style.Mystyle);

 <style name="AppTheme" parent="Theme.AppCompat">
 <item name="android:dialogTheme">@style/Mystyle.Dialog</item>
 <style name="Mystyle.Dialog" parent="Theme.AppCompat.Light.Dialog">

        <item name="colorAccent">@color/color_accent</item>

        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowCloseOnTouchOutside">false</item>

Any help? Actually messsage is in white color.

waclaw
  • 433
  • 1
  • 7
  • 18
  • http://stackoverflow.com/questions/29797134/how-to-use-and-style-the-new-alertdialog-from-appcompat-22-1 – waclaw May 19 '15 at 14:23

1 Answers1

1

If you use AlertDialog and apply custom style still it will display black shadow though you have set android:windowBackground transparent.

So you need to use Dialog and apply that custom style to it which will solve your issue.

Piyush
  • 18,895
  • 5
  • 32
  • 63
  • http://stackoverflow.com/questions/29797134/how-to-use-and-style-the-new-alertdialog-from-appcompat-22-1 – waclaw May 18 '15 at 11:28