安卓EditText设置圆角背景出现黑框,设置如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<corners android:radius="3dp"/>
<stroke android:width="1dp" android:color="@color/grey"/>
<padding
android:right="10dp"
android:left="10dp"
android:top="10dp"
android:bottom="10dp"/>
</shape>
引用如下:
<EditText
android:id="@+id/et_login_phone"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:inputType="number"
android:background="@drawable/shape_btn_rectangle_grey"
android:hint="@string/phone_hint"
android:textColorHint="@color/grey"
style="@style/editview_black"
android:singleLine="true"
/>
低版本运行的时候就出现了这种情况:
[img=https://img-bbs.csdn.net/upload/201601/08/1452232348_738717.png]
这是怎么回事呢?
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<corners android:radius="3dp"/>
<stroke android:width="1dp" android:color="@color/grey"/>
<padding
android:right="10dp"
android:left="10dp"
android:top="10dp"
android:bottom="10dp"/>
</shape>
引用如下:
<EditText
android:id="@+id/et_login_phone"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:inputType="number"
android:background="@drawable/shape_btn_rectangle_grey"
android:hint="@string/phone_hint"
android:textColorHint="@color/grey"
style="@style/editview_black"
android:singleLine="true"
/>
低版本运行的时候就出现了这种情况:
[img=https://img-bbs.csdn.net/upload/201601/08/1452232348_738717.png]
这是怎么回事呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货