Reputation: 2097
Here is the official material dialog spec:
I would like to increase the action panel height(52dp)/paddings(8dp) to get more space around the buttons. Is there a proper way to do so via styles?
Upvotes: 1
Views: 211
Reputation: 364451
You can do it using:
<style name="AlertDialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="buttonBarStyle">@style/myButtonBar</item>
</style>
<style name="myButtonBar" parent="Widget.AppCompat.ButtonBar">
<item name="android:paddingTop">32dp</item>
<item name="android:paddingBottom">32dp</item>
</style>
and then just use:
new MaterialAlertDialogBuilder(context,R.style.AlertDialog)
.setTitle("...")
.setMessage(".....")
...
.show();
Upvotes: 2
Reputation: 988
You have multiple options such as:
Please take a look at this example, you should find what you need:
https://medium.com/over-engineering/setting-up-a-material-components-theme-for-android-fbf7774da739
Upvotes: 0