<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="用户名:"
android:textSize="16sp"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请填写登录帐号"
android:selectAllOnFocus="true"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="密码:"
android:textSize="16sp"
/>
<!--只接受数字密码-->
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberPassword"
android:hint="请输入密码"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="电话号码"
/>
<!--只接受数字输入-->
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="输入电话号码"
android:inputType="number"
/>
<!--日期输入-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="生日"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="输入日期"
android:inputType="date"
/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="注册"
/>
android:EditText备忘
最新推荐文章于 2022-07-02 21:30:37 发布
本文详细介绍了在应用程序设计中常见的表单元素,包括用户名、密码、电话号码及日期等输入框的具体配置方式。通过具体的XML代码示例展示了每种类型输入框的设置方法,如数字密码输入、电话号码输入及日期选择等。
1135

被折叠的 条评论
为什么被折叠?



