zoukankan      html  css  js  c++  java
  • android--EditView属性简介

    <EditText
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:hint="请输入密码"
            android:maxLength="5"
            android:drawableLeft="@drawable/ic_launcher"
            android:inputType="number"
            />

    hint:提示信息,当输入文本后,自动消失;

    maxLength:文本框中能输入的最大长度;

    drawableLeft:在文本框中左侧添加图片(ic_launcher  为图片的引用);

    inputType:在文本中输入的类型(包括:数字,汉字,字母,大写字母等等);

    添加文本样式--圆角

    <EditText
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:hint="请输入密码"
            android:maxLength="11"
            android:drawableLeft="@drawable/ic_launcher"
            android:inputType="number"
            android:background="@drawable/shape"
            />

    background 引用圆形样式

    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"/>
        <!-- 设置矩形的四个角卫弧形 -->
        <!-- radius为半径 -->
        <corners android:radius="5dip">
        </corners>
    </shape>

  • 相关阅读:
    spring boot RESTfuldemo测试类
    再谈Redirect(客户端重定向)和Dispatch(服务器端重定向)
    HTTP协议解析
    HTTP协议详解(真的很经典)
    JMeter进行简单的数据库(mysql)压力测试
    LoadRunner利用ODBC编写MySql脚本
    性能瓶颈的分析
    bug的处理流程
    Loadrunner11 录制手机App脚本多种方法介绍
    利用fiddler录制脚本
  • 原文地址:https://www.cnblogs.com/WTFly/p/3497966.html
Copyright © 2011-2022 走看看