Dialog activity matching parent's width
Extend your theme from .Dialog.Alert
<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.
<style name="YOUR_THEME_NAME" parent="@style/Theme.AppCompat.Light.Dialog.Alert">
<!--your theme here-->
</style>