Extend your theme from .Dialog.Alert

1
2
3
<style name="YOUR_THEME_NAME" parent="@style/Theme.AppCompat.Light.Dialog.Alert">
<!--your theme here-->
</style>

Do not extend your theme from .Dialog, if you want your dialog to match parent/window’s width.

1
2
3
<style name="YOUR_THEME_NAME" parent="@style/Theme.AppCompat.Light.Dialog.Alert">
<!--your theme here-->
</style>