码迷,mamicode.com
首页 > 其他好文 > 详细

EditText

时间:2016-06-04 11:58:10      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 2     xmlns:tools="http://schemas.android.com/tools"
 3     android:layout_width="match_parent"
 4     android:layout_height="match_parent"
 5        android:orientation="horizontal"
 6     tools:context="com.example.edittext.MainActivity" >
 7     <!-- EditText的常用属性
 8         android:hint 当编辑框内容为空时的提示
 9         android:inputType 限制输入的内容 
10         android:digits 限制输入的字符 
11         requestFocus 自动获得焦点-->
12         <EditText 
13             android:layout_width="wrap_content"
14             android:layout_height="wrap_content"
15             android:inputType="textCapCharacters"
16             android:hint="输入大写字母"
17            />
18         <EditText 
19             android:layout_width="wrap_content"
20             android:layout_height="wrap_content"
21             android:inputType="textCapWords"
22             android:hint="单词首字母为大写"
23            />
24         <EditText 
25             android:layout_width="wrap_content"
26             android:layout_height="wrap_content"
27             android:inputType="textCapSentences"
28             android:hint="句子首字母为大写"
29            />
30         <EditText 
31             android:layout_width="wrap_content"
32             android:layout_height="wrap_content"
33             android:digits="0123456789abcdef"
34             android:hint="限定数字16进制数"
35            />
36         <EditText 
37             android:layout_width="wrap_content"
38             android:layout_height="wrap_content"
39             android:inputType="textCapSentences"
40             android:hint="自动获得焦点">
41             <requestFocus/>
42          </EditText>
43           
44 </LinearLayout>

 

EditText

标签:

原文地址:http://www.cnblogs.com/fangg/p/5558307.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!