AndroidstudioAPP开发表格布局用表格布局写一个用户登录界面

AndroidstudioAPP开发表格布局⽤表格布局写⼀个⽤户登录界⾯表格布局
表格布局就是以⾏列的形式来管理布局管理器中的组件,使组件以特定的⾏列排列
表格布局⽤TableLayout标记定义,在表格布局中,⽤TableRow来标记,每个TableRow占⽤⼀⾏
TableLayout⽀持的属性
属性作⽤
android:collapseColums设置需要被隐藏的列序号(序号从0开始),多个列序号之间⽤逗号隔开
android:shrinkColums设置允许被收缩的列的列序号(序号哦才能够0开始),多个列序号之间⽤逗号隔开android:stretchColums设置允许被拉伸的序列号(序号从0开始), 多个列序号之间⽤逗号隔开
<TableLayout xmlns:android="schemas.android/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:padding="20dp"
android:weightSum="15">
智慧杀虫灯<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="6dp">
<TextView/>
<TextView
android:text="⽤户名"
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:textSize="24sp"/>
对扣
<EditText
android:id="@+id/editText1"箱型钢
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="24sp"
android:minWidth="200dp"/>
</TableRow>
<TableRow
顶到子宫肚子涨
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="6dp">
<TextView/>
<TextView
线路保护
android:text="密码"
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:textSize="24sp"/>
<EditText
android:id="@+id/editText2"
android:id="@+id/editText2"
小型生物反应器
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="24sp"
android:minWidth="200dp"
android:inputType="textPassword"/>
</TableRow>
<TableRow
android:id="@+id/tableRow3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="10dp">
<TextView/>
<Button
android:text="登录"
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/colorAccent"            android:textSize="24sp"/>
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="退出"
android:background="@color/colorAccent"            android:textSize="24sp"
android:minWidth="200dp"/>
</TableRow>
</TableLayout>

本文发布于:2024-09-24 02:34:09,感谢您对本站的认可!

本文链接:https://www.17tex.com/tex/4/277397.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:布局   序号   表格   设置   隔开   允许   逗号   线路
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议