圆角EditText

来源:互联网 发布:java抽象类实现接口 编辑:程序博客网 时间:2024/06/14 07:29

首先定义一个圆角xml

res/drawable/round_edittext.xml

<?xml version="1.0" encoding="utf-8"?>  <shape xmlns:android="http://schemas.android.com/apk/res/android"      android:shape="rectangle" android:padding="10dp">      <solid android:color="#FFFFFF" />      <corners android:bottomRightRadius="15dp"          android:bottomLeftRadius="15dp" android:topLeftRadius="15dp"          android:topRightRadius="15dp" />  </shape>  

然后在EditText属性里设置background

android:background="@drawable/round_edittext"  



0 0
原创粉丝点击