<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="使用android:digits属性(输入数字)"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:background="#ffffff"
android:layout_margin="10dp"
android:digits="0123456789"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="使用android:numeric属性(输入有符号的浮点数)"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:background="#ffffff"
android:layout_margin="10dp"
android:numeric="decimal|signed"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="使用android:inputType属性(输入数字)"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:background="#ffffff"
android:layout_margin="10dp"
android:inputType="number"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="使用android:digits属性(输入26个小写字母)"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:textColor="#000000"
android:background="#ffffff"
android:layout_margin="10dp"
android:digits="abcdefghijklmnopqrstuvwxyz"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="使用android:inputType属性(输入Email)"
/>
<EditText
android:layout_width="200dp"
android:layout_height="wrap_content"
android:textColor="#000"
android:background="#fff"
android:layout_margin="10dp"
android:inputType="textEmailAddress"
/>
</LinearLayout>

更多相关文章

  1. android 自定义View中获取系统属性
  2. Android(安卓)TextView跑马灯抖动问题
  3. Android布局属性详解
  4. GridView, ListView 区别
  5. Android:configChanges 属性
  6. android自定义属性 format类型
  7. 安卓如何限制横屏和竖屏
  8. Android学习笔记之mainfest文件中android属性
  9. android studio连接adb,远程调试

随机推荐

  1. 热文精选——架构篇
  2. Ubuntu 19.10 Release Party 北京站–活
  3. 小程序开发:调用百度文字识别接口实现图文
  4. Ubuntu 19.10 特性抢鲜看
  5. 循环语句
  6. Ubuntu 19.10 Release Party 重庆站–活
  7. java开发抖音短视频无水印下载工具
  8. 2021.1.30
  9. 学习Linux的第13天
  10. 学习打卡 1-30 半完成