Android学习3之EditText可编辑的文本框组件
2015-06-14 19:03
591 查看
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!--
该编辑框ID默认为选中
-->
<EditText
android:id="@+id/mytext1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="editview编辑框默认的文字信息"
android:selectAllOnFocus="true"/>
<!--
该编辑框为密码输入框
-->
<EditText
android:id="@+id/mytext2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:password="true"
android:text="用户登录的密码"/>
<!--
该编辑框只能输入数字
-->
<EditText
android:id="@+id/mytext3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:numeric="integer"
android:text="123456789"/>
</LinearLayout>
效果图 :
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!--
该编辑框ID默认为选中
-->
<EditText
android:id="@+id/mytext1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="editview编辑框默认的文字信息"
android:selectAllOnFocus="true"/>
<!--
该编辑框为密码输入框
-->
<EditText
android:id="@+id/mytext2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:password="true"
android:text="用户登录的密码"/>
<!--
该编辑框只能输入数字
-->
<EditText
android:id="@+id/mytext3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:numeric="integer"
android:text="123456789"/>
</LinearLayout>
效果图 :
相关文章推荐
- 简单的android闹钟
- Android 学习控件1-TextView
- android之属性动画
- android json解析
- Android之GridView
- Android Studio开发配置NDK环境
- Android中visibility属性VISIBLE、INVISIBLE、GONE的区别
- Android学习记录--ListView取id的疑问
- Android 4.0+ 系统中SystemBars的适配问题
- (转) Android开发性能优化简介
- android adb 读写模式 挂载文件系统
- Android中项目中各个文件夹的含义和用途详解
- Android---56---Android应用调用Web Service/号码归属地查询
- android笔记之ViewFlipper的使用
- Ubuntu环境:Android开发平台搭建
- Android开发之初识Camera图像采集
- Android开发之SurfaceView
- 联想ThinkCenter M4350t型号主机怎样开启Intel Virtualization Technology功能
- android开发论坛
- android开发论坛