Rounded corners on material button

2020-02-17 06:21发布

I'm following the tips from questions like this to create a button style like suggested on Material Design.

Button

However, I need to change the corner radius and haven't been able to do so by inheriting Widget.AppCompat.Button.Colored style and setting the radius parameter.

How can I have the same style but with rounded corners?

7条回答
神经病院院长
2楼-- · 2020-02-17 07:21

Now use MaterialButton for rounded button many more thing you can do with this. please follow link

and add app:cornerRadius="8dp"for rounded corner

and don't forget to add google material libs in build.gradle

implementation "com.google.android.material:material:1.1.0"
查看更多
登录 后发表回答