围绕按钮或EditText的角落

时间:2014-02-17 19:06:03

标签: android-edittext

在我的Android应用程序中,我想绕过我的按钮和我的EditText的角落。我怎么能这样做?

2 个答案:

答案 0 :(得分:0)

尝试使用适用的9-patch

答案 1 :(得分:0)

我建议您使用以下XML创建一个新的background.xml文件:

<shape android:xmlns="schemas.android.com/res/apk android:shape="rectangle">
    <corner android:radious="3dp"/>
    <stroke android:color="#000"/>
</shape>

您可以在EditText属性中编写属性以创建圆形边框,如下所示:

android:background="@drawable/background"
相关问题