创建登入界面

本文展示了一个使用XML定义的GridLayout布局文件示例。该布局包括用户名和密码输入框及两个按钮,采用Android特有的属性进行定义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

> <?xml version="1.0" encoding="utf-8"?> <GridLayout
>     xmlns:android="http://schemas.android.com/apk/res/android"
>     android:minWidth="25px"
>     android:minHeight="25px"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     android:rowCount="10"
>     android:columnCount="4"
>     android:id="@+id/gridLayout1" >
>     <TextView
>         android:text="用户名:"
>         android:textAppearance="?android:attr/textAppearanceMedium"
>         android:layout_row="0"
>         android:layout_column="0"
>         android:layout_rowSpan="0"
>         android:layout_columnSpan="1"
>         android:id="@+id/textView1" />
> 
>     <EditText
>         android:inputType="textPassword"
>         android:layout_row="0"
>         android:layout_column="1"
>         android:layout_rowSpan="1"
>         android:layout_columnSpan="3"
>         android:id="@+id/editText_hhm"
>         android:accessibilityHeading="true"
>         android:layout_gravity="fill" />
>     
>     <TextView
>         android:text="密  码:"
>         android:textAppearance="?android:attr/textAppearanceMedium"
>         android:id="@+id/textView2" />
>     <EditText
>           android:layout_row="1"
>         android:layout_column="1"
>         android:layout_rowSpan="1"
>         android:layout_columnSpan="3"
>        android:inputType="textPassword"
>          android:layout_gravity="fill"
>        android:id="@+id/editText_mm" />
>     <Button
>         android:text="登入"
>         android:id="@+id/button_DR" />
>     <Button
>        android:text="退出"
>        android:id="@+id/button_XQ" /> </GridLayout>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值