您的位置:首页 > 其它

用户友好的输入界面

2015-07-24 09:04 274 查看


Demo2\youhao\src\main\res\layout\activity_main.xml

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1"
tools:context=".MainActivity">

<TableRow>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="用户名"
android:textSize="16dp" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请填写登录账号"
android:selectAllOnFocus="true" />
</TableRow>

<TableRow>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="密码"
android:textSize="16dp" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请填写登录密码"
android:inputType="numberPassword" />
</TableRow>

<TableRow>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="年龄"
android:textSize="16dp" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请填写年龄"
android:inputType="number" />
</TableRow>

<TableRow>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="生日"
android:textSize="16dp" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请填写生日"
android:inputType="date" />
</TableRow>

<TableRow>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="电话号码"
android:textSize="16dp" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请填写电话号码"
android:inputType="phone"
android:selectAllOnFocus="true" />
</TableRow>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="注册
" />
</TableLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: