tablelayout.xml表格布局

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1,2">
<!--stretchColumns 设置自动拉伸列的序号-->
<!--TableRow 表格行-->
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="账号:"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入用户名"
android:layout_span="2"
/>
<!--layout_span 跨列-->/> </TableRow>
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="密码:"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入密码"
android:password="true"
android:layout_span="2"
/>
<!--password 是否是密码框--> </TableRow>
<TableRow>
<Button
android:layout_width="odp"
android:layout_height="wrap_content"
android:text="登陆"
android:layout_weight="1"
/>
<!--layout_weight 权重-->
<Button
android:layout_width="odp"
android:layout_height="wrap_content"
android:text="注册"
android:id="@+id/button2"
android:layout_weight="1"
/>
<Button
android:layout_width="odp"
android:layout_height="wrap_content"
android:text="取消"
android:layout_weight="1"
/>
</TableRow> </TableLayout>

andorid 表格布局的更多相关文章

  1. android——相对布局,表格布局

    1.相对布局 RelativeLayout 又称作相对布局,也是一种非常常用的布局.和LinearLayout 的排列规则不同,RelativeLayout 显得更加随意一些,它可以通过相对定位的方式 ...

  2. Android之UI编程(二):表格布局

    表格布局(TableLayout)继承了LinearLayout,它的本质依然是线性布局管理器,表TableLayout采用行.列的形式来管理UI组件,它并不需要明确地声明暴行多少行.多少列,而是通过 ...

  3. 黑马程序员——HTML表格布局

    ---------------------- <a href="http://edu.csdn.net"target="blank">ASP.Net ...

  4. Android课程---表格布局TableLayout

    特别注意:由于表格布局继承自线性布局,因此并不显示表格线 示例代码: <?xml version="1.0" encoding="utf-8"?> ...

  5. Android布局-TableLayout表格布局

    一.表格布局-TableLayout 1.概念 表格布局采用行列的形式来管理UI的控件.表格布局适合于有规则的布局. TableRow,用来管理行,TableRow中的一个空间占据该行的一列.若不用T ...

  6. 案例:TableLayout表格布局——迷你计算器

    计算器可以常用线性布局(LinearLayout)和表格布局(tableLayout).Gridlayout 今天我用的是表格布局 效果如下: 代码如下: <TableLayout xmlns: ...

  7. TableLayout(表格布局)

    表格布局模型以行列的形式管理子控件,每一行为一个TableRow的对象,当然也可以是一个View的对象.TableRow可以添加子控件,每添加一个为一列. TableLayout属性: android ...

  8. 3月23.CSS表格布局

    360表格布局: CSS定义标签: @charset "utf-8";/* CSS Document */.bt1{ border:#309 solid 1px; height:1 ...

  9. 【转】TableLayout(表格布局)

    转自:http://www.cnblogs.com/zhangs1986/archive/2013/01/17/2864536.html TableLayout(表格布局) 表格布局模型以行列的形式管 ...

随机推荐

  1. Mybatis之mapper.xml配置文件中的#{}和${}

    #{}表示一个占位符号,通过#{}可以实现preparedStatement向占位符中设置值,自动进行java类型和jdbc类型转换.#{}可以有效防止sql注入. #{}可以接收简单类型值或pojo ...

  2. ubuntu16.04 64bit 升级到 python3.6

    https://blog.csdn.net/zhao__zhen/article/details/81584933 https://www.codetd.com/article/1967538 htt ...

  3. php预定义字符

    Php中预定义字符的处理: 1,htmlspecialchars()把一些预定义的字符转换为 HTML 实体. 函数原型:htmlspecialchars(string,quotestyle,char ...

  4. 云主机上配置lamp环境 php5.6+apache2.2.15+mysql5.1.73

    安装 PHP5.6 rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm; rp ...

  5. whatweb工具

    WhatWeb WhatWeb可以用来确定服务器使用的CMS.博客平台.统计分析软件包.JavaScript库等.这个工具有超过900个插件用来扫描目标. 使用方法: root@root:/pente ...

  6. Bootstrap的aria-label和aria-labelledby

    [Bootstrap的aria-label和aria-labelledby] 用于盲人阅读的属性,基本也没什么用. 参考:http://blog.csdn.net/liuyan19891230/art ...

  7. 无线渗透开启WPS功能的路由器

    首先关闭网络服务 service network-manager stop wps一般可在10-20小时可以爆破开,攻击难度较低,有一些厂家的无线路由甚至无法关闭WPS功能. 开始侦听开启wps功能的 ...

  8. TCP和UDP协议的比较

    通信协议 网络通信是两台计算机上的两个进程之间的通信. 网络通信需要通信协议.网络协议有很多种,就像我们平常交流说话,也有多种语言.. 最常见的协议是TCP/IP协议.UDP协议. TCP:TCP 是 ...

  9. CentOS 几种重启方式的区别

    Linux centos重启命令: 1.reboot   普通重启 2.shutdown -r now 立刻重启(root用户使用) 3.shutdown -r 10 过10分钟自动重启(root用户 ...

  10. docker容器和镜像

    这篇文章希望能够帮助读者深入理解Docker的命令,还有容器(container)和镜像(image)之间的区别,并深入探讨容器和运行中的容器之间的区别. 当我对Docker技术还是一知半解的时候,我 ...