首先是在drawable中设置一个有弧度的长方形样式
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff"></solid>
<corners
android:bottomLeftRadius="15dp"
android:bottomRightRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp"></corners>
</shape>
将background设置为以上的地址,drawableleft是设置左边有一个图片,有人放一个ImageView,我觉得无所谓啦。
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/text"
android:background="@drawable/rounded_edittext"
android:drawableLeft="@mipmap/icon48" />
原文:http://www.cnblogs.com/lyxin/p/5816356.html