一.所花时间

0.5h

二.代码量

30行

三.博客量

1篇

四.了解到的知识点

圆角矩形输入框

<?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android" >
 <!-- 指定了形状内部的填充颜色 -->
 <solid android:color="#ffffff" />
 <!-- 指定了形状轮廓的粗细与颜色 -->
 <stroke
 android:width="1dp"
 android:color="#aaaaaa" />
 <!-- 指定了形状四个圆角的半径 -->
 <corners android:radius="5dp" />
 <!-- 指定了形状四个方向的间距 -->
 <padding
 android:bottom="2dp"
 android:left="2dp"
 android:right="2dp"
 android:top="2dp" />
 </shape>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="5dp"
    android:orientation="vertical" >
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="text"
        android:hint="这是默认边框"
        android:textColor="@color/black"
        android:textSize="17sp" />
    
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:inputType="text"
        android:hint="我的边框不见了"
        android:background="@null"
        android:textColor="@color/black"
        android:textSize="17sp" />
    
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:inputType="text"
        android:hint="我的边框是圆角"
        android:background="@drawable/editext_selector"
        android:textColor="@color/black"
        android:textSize="17sp" />
    
</LinearLayout>

 

posted on 2024-05-13 10:49  leapss  阅读(10)  评论(0)    收藏  举报