把下面的代码保存到res/drawable/et.xml,在layout中的EditText添加属性android:background="@drawable/et"et.xml↓代码<?xml version="1.0" encoding="utf-8"?><layer-listxmlns:android="http://schemas.android.com/apk/res/android"><item><shapexmlns:android="http://schemas.android.com/apk/res/android"android:shape="rectangle"><solidandroid:color="#EFEFEF"/> <cornersandroid:bottomRightRadius="5dip"android:bottomLeftRadius="5dip"android:topLeftRadius="5dip"android:topRightRadius="5dip"/><strokeandroid:width="0.5px"android:color="#505050"/></shape></item></layer-list>
网友评论