zoukankan      html  css  js  c++  java
  • EditText输入属性

    1、

    android:inputType="none"

    android:inputType="text"

    android:inputType="textCapCharacters"//前3个输入普通字符

    android:inputType="textCapWords"//单词首字母大小

    android:inputType="textCapSentences"//仅第一个字母大小

    android:inputType="textAutoCorrect"

    android:inputType="textAutoComplete"//前两个自动完成

    android:inputType="textMultiLine"//多行输入

    android:inputType="textImeMultiLine"//输入法多行(不一定支持)

    android:inputType="textNoSuggestions"//不提示

    android:inputType="textUri"//URI格式

    android:inputType="textEmailAddress"//电子邮件地址格式

    android:inputType="textEmailSubject"//邮件主题格式

    android:inputType="textShortMessage"//短消息格式

    android:inputType="textLongMessage"

    android:inputType="textPersonName"//人名格式

    android:inputType="textPostalAddress"//邮政格式

    android:inputType="textPassword"//密码格式

    android:inputType="textVisiblePassword"//密码可见格式

    android:inputType="textWebEditText"//作为网页表单的文本格式

    android:inputType="textFilter"//文本筛选格式

    android:inputType="textPhonetic"//拼音输入格式

    android:inputType="number"//数字格式

    android:inputType="numberSigned"//有符号数字格式

    android:inputType="numberDecimal"//可以带小数点的浮点格式

    android:inputType="phone"//拨号键盘

    android:inputType="datetime"

    android:inputType="date"//日期键盘

    android:inputType="time"//时间键盘

    2、

    输入法Enter键图标的设置:

    软件盘的界面替换只有一个属性android:imeOptions,这个属性的可以取的值有normal,actionUnspecified,actionNone,actionGo,actionSearch,actionSend,actionNext,actionDone,例如当值为actionNext时enter键外观变成一个向下箭头,而值为actionDone时enter键外观则变成了“完成”两个字。
    我们也可以重写enter的事件

    软键盘的Enter键默认显示的是“完成”文本,通过设置android:imeOptions来改变默认的“完成”文本。这里举几个常用的常量值:

    actionUnspecified  未指定,对应常量EditorInfo.IME_ACTION_UNSPECIFIED. 
    actionNone 没有动作,对应常量EditorInfo.IME_ACTION_NONE
    actionGo 去往,对应常量EditorInfo.IME_ACTION_GO
    actionSearch 搜索,对应常量EditorInfo.IME_ACTION_SEARCH   
    actionSend 发送,对应常量EditorInfo.IME_ACTION_SEND  
    actionNext 下一个,对应常量EditorInfo.IME_ACTION_NEXT  
    actionDone 完成,对应常量EditorInfo.IME_ACTION_DONE 

    (EditorInfo.inputType & EditorInfo.TYPE_CLASS_MASK)可以是许多不同的值,包括:
    TYPE_CLASS_NUMBER
    TYPE_CLASS_DATETIME
    TYPE_CLASS_PHONE
    TYPE_CLASS_TEXT

  • 相关阅读:
    php数据库常用函数
    什么是RESTful API
    RESTful API 设计指南
    json和jsonp的使用区别
    Memcached, Redis, MongoDB区别
    入门系列之在Nginx配置Gzip
    100行代码搞定抖音短视频App,终于可以和美女合唱了。
    游戏开发者注意!这个音频SDK可以完美兼容所有主流游戏引擎
    快速上手:在CVM上安装Apache
    聚焦小游戏技术生态,腾讯游戏云GAME-TECH落地厦门
  • 原文地址:https://www.cnblogs.com/judes/p/5787831.html
Copyright © 2011-2022 走看看