I used the following code to change the background of Progress Dialog. But the color changes on the outside frame too as below. I want to change only inside the dialog.
<style name="StyledDialog" parent="@android:style/Theme.Panel">
<item name="android:background">#083044</item>
</style>
As per the answer given at this question Change background of ProgressDialog
<style name="StyledDialog" parent="@android:style/Theme.Dialog">
<item name="android:alertDialogStyle">@style/CustomAlertDialogStyle</item>
<item name="android:textColorPrimary">#000000</item>
</style>
<style name="CustomAlertDialogStyle">
<item name="android:bottomBright">@color/background</item>
<item name="android:bottomDark">@color/background</item>
<item name="android:bottomMedium">@color/background</item>
<item name="android:centerBright">@color/background</item>
<item name="android:centerDark">@color/background</item>
<item name="android:centerMedium">@color/background</item>
<item name="android:fullBright">@color/background</item>
<item name="android:fullDark">@color/background</item>
<item name="android:topBright">@color/background</item>
<item name="android:topDark">@color/background</item>
</style>
This code gives background color perfect. But since, dialog color and activity's background color is same. It appears like transparent with no border. I want some border as before.
<style name="CustomAlertDialogStyle">
<item name="android:bottomBright">@color/transparent</item>
<item name="android:bottomDark">@color/transparent</item>
<item name="android:bottomMedium">@color/transparent</item>
<item name="android:centerBright">@color/transparent</item>
<item name="android:centerDark">@color/transparent</item>
<item name="android:centerMedium">@color/transparent</item>
<item name="android:fullBright">@color/transparent</item>
<item name="android:fullDark">@color/transparent</item>
<item name="android:topBright">@color/transparent</item>
<item name="android:topDark">@color/transparent</item>
</style>
<style name="StyledDialog" parent="@android:style/Theme.Panel">
<item name="android:alertDialogStyle">@style/CustomAlertDialogStyle</item>
<item name="android:background">@color/darkblue</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With