如何使一个圆形按钮? [英] How to make a round button?
本文介绍了如何使一个圆形按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图做一个圆形按钮,但我不知道我能做到这一点。我可以按钮圆角,但我怎么能能圆圈。这是不一样的。请告诉我,有没有可能在Android?谢谢。
I'm trying to make a round button, but I don't know how can I do it. I can make button with rounded corners, but how can I can round circle. It's not the same. Please, tell me, is it possible on Android? Thank you.
推荐答案
创建一个名为 roundedbutton.xml
在绘制文件夹中的XML文件
Create an xml file named roundedbutton.xml
in drawable folder
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#eeffffff" />
<corners android:bottomRightRadius="8dp"
android:bottomLeftRadius="8dp"
android:topRightRadius="8dp"
android:topLeftRadius="8dp"/>
</shape>
最后设置为背景,以你的按钮
为安卓背景=@可绘制/ roundedbutton
如果你想使之完全圆润,改变半径和解决的东西是确定你。
If you want to make it completely rounded, alter the radius and settle for something that is ok for you.
这篇关于如何使一个圆形按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文