SHINCHVEN'S HEXO

Dialog activity matching parent's width

Count: 65Reading time: 1 min
2018/09/22 Share

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>
CATALOG
  1. 1. Extend your theme from .Dialog.Alert