[Androrid]笔记9-用户友好的输入界面
来源:互联网 发布:人工智能技术专业 编辑:程序博客网 时间:2024/05/17 08:22
对于一个用户友好的输入界面而言,接受用户输入的文本框内默认会提示用户如何输入;当前用户把焦点切换到输入框时,输入框自动选中其中已输入的内容,避免用户删除已有内容;当用户把焦点切换到只接受电话号码时,输入法自动切换到键盘
<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:androrid="http://schemas.android.com/apk/res/android" androrid:layout_width="match_parent" androrid:layout_height="match_parent" androrid:stretchColumns="1" > <TableRow> <TextView androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:text="用户名" androrid:textSize="16sp" /> <EditText androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:hint="请填写登录账号" androrid:selectAllOnFocus="true" /> </TableRow> <TableRow> <TextView androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:text="密码" androrid:textSize="16sp" /> <!--只能接受数字密码--> <EditText androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:inputType="numberPassword" /> </TableRow> <TableRow> <TextView androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:text="年龄" androrid:textSize="16sp" /> <!--inputType="number"表明只能输入数值--> <EditText androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:inputType="number" /> </TableRow> <TableRow> <TextView androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:text="生日" androrid:textSize="16sp" /> <!--inputType="date"表明日期输入框--> <EditText androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:inputType="date" /> </TableRow> <TableRow> <TextView androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:hint="请填写您的电话号码" androrid:text="电话号码" androrid:textSize="16sp" /> <!--inputType="phone"表明只能输入数值--> <EditText androrid:layout_width="match_parent" androrid:layout_height="wrap_content" androrid:selectAllOnFocus="true" androrid:inputType="phone" /> </TableRow> <Button androrid:layout_width="wrap_content" androrid:layout_height="wrap_content" androrid:text="注册" /></TableLayout>
阅读全文
0 0
- [Androrid]笔记9-用户友好的输入界面
- 用户友好输入界面
- Android EditText用户友好的输入界面
- 用户友好界面
- struts2:默认的Action(用户友好界面)和后缀
- 友好型的ui界面
- 表单的友好用户体现
- 【Androrid笔记】android studio签名
- sharepoint 域认证的时候给用户一个友好的登陆界面
- Android EditText输入最大长度限制如何给用户以友好的提示
- Android EditText输入最大长度限制如何给用户以友好的提示
- Extjs 一种友好的界面提示
- 友好界面的爬虫监控系统
- java编程300例:5.通过用户输入,友好打招呼
- 输入文本框时的友好提示
- sharepoint域认证的时候给用户一个友好的登陆界面(windows认证模拟登陆)
- 用户友好的,网站设计方式总结
- 10种用户友好的验证码
- SQL Server 的“高可用性”与“灾难恢复” 之二 故障转移群集
- 多线程编程
- FILE *stdout 和 STDOUT_FILENO 的区别
- 破解前端面试系列(3):如何搞定纸上代码环节?
- 金蝶EAS,序时簿界面去除数据隔离,根据枚举项实现背景色标记,数据排序
- [Androrid]笔记9-用户友好的输入界面
- tcp/ip和udp之间的区别
- 第九周作业:Fizz Buzz
- Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds.
- MySQL(二):MySQL性能优化
- mybatis的mapper返回map结果集
- Android调用系统相机和图库设置到控件上并上传服务器
- 一个 11 行 Python 代码实现的神经网络
- Pyunit源码笔记之七 testcase正式执行,重点重点重点