回答(14)
2 years ago
在drawable文件夹中创建名为 roundedbutton.xml 的xml文件
android:shape="rectangle">
android:bottomLeftRadius="8dp"
android:topRightRadius="8dp"
android:topLeftRadius="8dp"/>
最后将其设置为 Button 的背景为 android:background = "@drawable/roundedbutton"
如果你想让它完全圆润,改变半径并找到适合你的东西 .
2 years ago
如果使用Android Studio,您可以使用:
android:shape="ring">
这对我来说很好,希望这有助于某人 .