表格布局tabelLayout

一、简介

二、实例

<!-- 这个tableRow里面有两个组件,所以是两列 -->
<!-- 这个tableRow里面有三个组件,所以是三列 -->

 <?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" > <!-- 表格布局主要有tablerow属性,要几列就在里面添加几个控件即可 -->
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- 这个tableRow里面有两个组件,所以是两列 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textSize="50sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textSize="50sp"
/>
</TableRow> <!-- 第二行 -->
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- 这个tableRow里面有三个组件,所以是三列 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="21"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textSize="50sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="22"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textSize="50sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="23"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textSize="50sp"
/>
</TableRow> </TableLayout>

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

  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. django之多表查询与创建

    https://www.cnblogs.com/liuqingzheng/articles/9499252.html # 一对多新增数据 添加一本北京出版社出版的书 第一种方式 ret=Book.ob ...

  2. CNN结构

    神经网络 卷积神经网络依旧是层级网络,只是层的功能和形式做了变化,可以说是传统神经网络的一个改进.多了许多传统神经网络没有的层次. 卷积神经网络的层级结构 数据输入层/Input Layer 卷积计算 ...

  3. 系列文章(一):探究电信诈骗的关键问题与应对策略——By Me

    导读:伴随着互联网与移动网的融合,移动互联网变得更加开放.与此同时,伴随着新型的移动互联网服务模式的出现,移动互联网的安全问题也出现了新的形式及特点. 如今,移动互联网遭受到的攻击已严重影响了人们的隐 ...

  4. Android View学习Tips

    1.Canvas.save()和Canvas.restore() canvas.save();和canvas.restore();是两个相互匹配出现的,作用是用来保存画布的状态和取出保存的状态的.这里 ...

  5. spawn 和 exec 的区别(转载)

    众所周知,Node.js在child_process模块中提供了spawn和exec这两个方法,用来开启子进程执行指定程序.这两个方法虽然目的一样,但是既然Node.js为我们提供了两个方法,那它们之 ...

  6. SignalTap II进阶学习

    1. 多级触发 有时候我们可能需要利用多个信号(最多10个)依次触发后,观察特定的值.这这时候我们可以增加触发条件来满足我们的需求. 多个触发信号如上图所示,只有依次发生SW[0]上升沿. SW[1] ...

  7. linux安装tree命令

    安装 yum install -y tree 使用,比如显示/root的2层树结构 tree -L 2 /root 效果 /root ├── \033 ├── code │   └── hellowo ...

  8. C/C++中的行读取

    在C语言里面一直很容易混淆的,gets和fgetS的区别: char * fgets ( char * str, int num, FILE * stream ); Reads characters ...

  9. Linux vim 操作技巧

    ·Linux设计的重要原则是信息存储在基于文本的文件中 文本文件:无格式文件,作用类似于win的注册表(etc下的配置文件,.conf或者无扩展名)可扩展标记语言(XML),文本标记定义数据结构(et ...

  10. freemarker split字符串分割 遍历map

    <#list "张三三,李思思,,王强,柳树,诸葛正我"?split(",") as name> "${name}" </ ...