android_7 editView
16lz
2021-01-25
main.xml:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> <EditText android:id="@+id/username1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:drawableLeft="@drawable/logo" android:hint="@string/hite_username" /> <EditText android:id="@+id/username2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:drawableLeft="@drawable/logo" android:hint="@string/hite_username" android:background="@drawable/shape" /> <EditText android:id="@+id/username3" android:layout_width="fill_parent" android:layout_height="wrap_content" android:drawableLeft="@drawable/logo" android:hint="@string/hite_username" android:background="@drawable/shape2" /></LinearLayout>
shape.xml:
<?xml version="1.0" encoding="UTF-8" ?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <!-- 填充的颜色 --> <solid android:color="#FFFFFf"/> <!-- 设置矩形的四个角为弧形 --> <corners android:radius="7dip"/></shape>
shape2.xml
<?xml version="1.0" encoding="UTF-8" ?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <!-- 填充的颜色 --> <solid android:color="#FFFFFf"/> <!-- 设置矩形的四个角为弧形 --> <corners android:topLeftRadius="7dip" /> <corners android:topRightRadius="7dip" /></shape>
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */package com.mhm.editview.activity;public final class R { public static final class attr { } public static final class drawable { public static final int ic_launcher=0x7f020000; public static final int logo=0x7f020001; public static final int shape=0x7f020002; public static final int shape2=0x7f020003; } public static final class id { public static final int username1=0x7f050000; public static final int username2=0x7f050001; public static final int username3=0x7f050002; } public static final class layout { public static final int main=0x7f030000; } public static final class string { public static final int app_name=0x7f040001; public static final int hello=0x7f040000; public static final int hite_username=0x7f040002; }}
从这里看出,左上角的弧线没有了,说明被最后一个冲突了。
更多相关文章
- android.graphics.Paint类详解
- Android布局颜色对应值
- xml中自定义图形
- 样式表以及Color.xml文件『Android系列六』
- Android中的Shape的使用
- android 实现滤镜效果
- Android(安卓)Studio如何去掉丑陋的标题栏//values文件夹结构的
- Android中EditText光标在4.0中的bug及解决方法
- Android修改圆形进度条ProgressBar的默认颜色