I want to set up a proper style for my ProgressDialog. I like the default one but I want to customize it. I've tried to use AppCompat dialogs but they all setup some weird width and height for my Dialog.
I found that extending from MaterialDialog do the trick, so this code works:
<style name="ProgressDialogTheme" parent="MaterialBaseTheme.AlertDialog" >
</style>
This is because MeterialDialog itself setup custom width
<style name="MaterialBaseTheme.AlertDialog" parent="MaterialBaseTheme.Dialog">
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
</style>
And I found that there is AppCompat dialog that set up the same custom width, here it is:
<style name="Base.Theme.AppCompat.Light.Dialog.Alert">
<item name="windowMinWidthMajor">@dimen/abc_dialog_min_width_major</item>
<item name="windowMinWidthMinor">@dimen/abc_dialog_min_width_minor</item>
</style>
but it do not work
The only difference is a andorid namespace at the beginning of MeterialDialog attribute.
Can someone explain why android:windowMinWidthMajor
do the trick?