Reputation: 46
I want to make two skin application and fast change background in dialogs. I have DialogFragments and when i want to display my own theme i do it by:
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.MyDialog);
And in styles.xml i have:
<style name="MyDialog" parent="@android:style/Theme.Holo.Dialog">
<item name="android:background">@color/background_black</item>
<item name="android:windowBackground">@null</item>
<item name="android:windowFrame">@null</item>
</style>
but it's doesn't works. How to remove that second background selected here: http://i62.tinypic.com/2i29dzr.png background between yellow lines
Upvotes: 1
Views: 895
Reputation: 11982
As for me I'm using this style to remove background of dialog, and it works for me perfectly:
<style name="CustomDialog" parent="@android:style/Theme.Holo.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:background">@android:color/transparent</item>
<item name="background">@android:color/transparent</item>
</style>
Upvotes: 3