【发布时间】:2020-10-20 04:56:14
【问题描述】:
所以我一直在尝试找到一种方法,使 Material Components 库中的 MaterialButton 具有完美的圆角。我的意思是实际上它们的角大小是按钮高度的 50%。
在某些documentation 中,它表明这应该可以通过下面的引用来实现。
可以使用绝对值或百分比值来确定形状大小。
我有几个可行的解决方案,首先测量视图并以这种方式设置角大小,但后来我发现ExtendedFloatingActionButton 使用RelativeCornerSize 对象。
但是,我仍然无法在 XML 中找到解决方案。
【问题讨论】:
标签: android android-layout android-button material-components-android materialbutton