【发布时间】:2022-01-17 14:56:24
【问题描述】:
查看图片here
我第一次在我的项目中使用 MDC(3),在我看到对话框之前一切都很顺利。这有什么问题?
根据文档,圆角半径的大小为 28dp
如何减小拐角半径的大小?
更新这里是我的代码(我刚刚根据@che10的回答更新了
themes.xml
<style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
</style>
styles.xml
<style name="MaterialAlertDialog.App" parent="MaterialAlertDialog.Material3">
<item name="shapeAppearance">@style/ShapeAppearance.App.MediumComponent</item>
</style>
<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.Material3.MediumComponent">
<item name="cornerSize">10dp</item>
</style>
在 Java 中
new MaterialAlertDialogBuilder(this,R.style.MaterialAlertDialog_App)
它仍然显示与默认相同的圆角半径 (28dp)
【问题讨论】:
标签: android material-components-android