1,常见类型

 <EditText
android:id="@+id/email_address"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/email_hint"
android:inputType="textEmailAddress" />

其中 android:inputType 用于指定键盘输入类型和回车键的行为。

text Normal text keyboard.
textEmailAddress Normal text keyboard with the @ character.
textUri Normal text keyboard with the / character.
number Basic number keypad.
phone Phone-style keypad.
date  
time  
textMultiLine  

2,回车键的行为

 <EditText
android:id="@+id/postal_address"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/postal_address_hint"
android:inputType="textPostalAddress|
textCapWords|
textNoSuggestions" />
textCapSentences Normal text keyboard that capitalizes the first letter for each new sentence. 每句首字母大写
textCapWords Normal text keyboard that capitalizes every word. Good for titles or person names. 每个单词大写
textAutoCorrect Normal text keyboard that corrects commonly misspelled words. 自动纠正一般拼写错误
textPassword Normal text keyboard, but the characters entered turn into dots. 心小黑点显示输入的内容
textMultiLine Normal text keyboard that allow users to input long strings of text that include line breaks (carriage returns). 可包含换行符等。
更多 https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType  

EditText(1)EditText的类型和回车键的行为的更多相关文章

  1. EditText限制输入字符类型的几种方式

    最近的项目上需要限制EditText输入字符的类型,就把可以实现这个功能的方法整理了一下: 1.第一种方式是通过EditText的inputType来实现,可以通过xml或者Java文件来设置.假如我 ...

  2. 【转】Android中EditText中的InputType类型含义与如何定义

    原文网址:http://www.crifan.com/summary_android_edittext_inputtype_values_and_meaning_definition/ 经过一些And ...

  3. 【整理】Android中EditText中的InputType类型含义与如何定义( 转 )

    转自:[整理]Android中EditText中的InputType类型含义与如何定义 用到的时候查到了这篇文章觉得很不错,就在此记录下. [背景] 经过一些Android中EditText方面的折腾 ...

  4. EditText设置输入的类型,只能输入纯数字,只能输入手机号码,只能输入邮箱等等。

    作者:程序员小冰,CSDN博客:http://blog.csdn.net/qq_21376985转载请说明出处. 下面以数字.电话为例讲述EditText怎么设置输入类型,其他类型可以参考InputT ...

  5. edittext把软键盘上的回车键改为搜索、发送或者 下一步,窗口随软键盘弹出而改变。

    http://m.blog.csdn.net/article/details?id=51350501 以上博文讲解很详细. 如图所示,有时候为了布局美观,在搜索时没有搜索按钮,而是调用软件盘上的按钮. ...

  6. Android EditText设置为Number类型后获取数字

    s_video_seg1 = Integer.parseInt(video_seg1.getEditableText().toString().trim()); 此处要使用getEditableTex ...

  7. 初识EditText - 自定义EditText形状

    EditText继承自TextView,是程序用于和用户进行交互的另一个重要控件,它允许用户在控件里输入和编辑内容,并可以在程序中对这些内容进行处理. 使用 android:hint属性来指定了一段提 ...

  8. EditText: 自定义EditText 触摸时无法获取焦点

    写了一个自定义View,继承EditText,但是在触摸时无法获取到焦点. 在XML中添加 android:focusableInTouchMode="true" 设置触摸时可以获 ...

  9. EditText(8)EditText中drawableRight图片的点击事件

    参考: http://stackoverflow.com/questions/3554377/handling-click-events-on-a-drawable-within-an-edittex ...

随机推荐

  1. 安装最新版本的zabbix

    1. 先安装php5.4 最新版本: yum安装php5.4或5.5 https://blog.csdn.net/MarkBoo/article/details/49424183 2. 然后参照官网或 ...

  2. hdu - 2645 find the nearest station (bfs水)

    http://acm.hdu.edu.cn/showproblem.php?pid=2645 找出每个点到距离最近的车站的距离. 直接bfs就好. #include <cstdio> #i ...

  3. 常用的delphi 第三方控件

    Devexpress VCL 这个基本上覆盖了系统界面及数据库展示的方方面面,是做桌面系统必备的一套控件,目前的版本是2011.2.3, 支持win32 及win64. AutoUpgrader 这个 ...

  4. [bzoj4520][Cqoi2016]K远点对_KD-Tree_堆

    K远点对 bzoj-4520 Cqoi-2016 题目大意:已知平面内 N 个点的坐标,求欧氏距离下的第 K 远点对. 注释:$1\le n\le 10^5$,$1\le k\le 100$,$k\l ...

  5. POJ2632 Crashing Robots 解题报告

    Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is neede ...

  6. 选择器的使用(target选择器)

    <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta ...

  7. ETL增量单表同步简述_根据dateTime增量

    ETL增量单表同步简述 1. 实现需求 当原数据库的表有新增.更新.删除操作时,将改动数据同步到目标库对应的数据表. 2. 设计思路 设计总体流程图如下: 步骤简单说明: 1.设置job的执行属性,如 ...

  8. Java这样学,Offer随便拿,学习方法和面试经验分享

    Java这样学,Offer随便拿,学习方法和面试经验分享 学习中:https://mp.weixin.qq.com/s/iSutLzqCiPMWwm_Rm_2oPw

  9. Office 连供打印机无法进纸怎么办 卡纸,塞纸怎么办

    我昨天打印还好好的,今天无法进纸了,哪怕只放一张纸,也是左边进去一点点,然后就塞住了,吸不下去了.   因为你的打印机里面有异物.你把连供拆掉(当心墨水流出来,把墨盒拆掉之后放高一点并用纸巾包住,不要 ...

  10. Redis官网下载步骤(含windows版)

    ①.百度redis ,进入官网 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...