Reputation: 4817
I have a FragmentActivity that makes at the beginning a fragment transacation loading a DialogFragment which builds an AlertDialog. The theme of the Activity is set to @android:style/Theme.Translucent.NoTitleBar. I tried all and I am not being able to show the DialogFragment without the background around.
Please do not care about the red ones, I only obfuscated my app. The green color is the problem is the backgound that I want to get rid of, if I set the color to Transparent, it is still shown in white.
Upvotes: 0
Views: 1874
Reputation: 5737
Set android:windowIsFloating to false and android:windowBackground to my custom color in the dialog style.
See similar question
Upvotes: 1
Reputation: 4817
When you create the DialogFragment and call it with show() you will get the background around, not matter if you set the background color to transparent. If you do a fragment transaction to show the DialogFragment, then you can change the color of the background around, and set it to Transparent.
Upvotes: 0