表格布局tabelLayout
表格布局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的更多相关文章
- android——相对布局,表格布局
1.相对布局 RelativeLayout 又称作相对布局,也是一种非常常用的布局.和LinearLayout 的排列规则不同,RelativeLayout 显得更加随意一些,它可以通过相对定位的方式 ...
- Android之UI编程(二):表格布局
表格布局(TableLayout)继承了LinearLayout,它的本质依然是线性布局管理器,表TableLayout采用行.列的形式来管理UI组件,它并不需要明确地声明暴行多少行.多少列,而是通过 ...
- 黑马程序员——HTML表格布局
---------------------- <a href="http://edu.csdn.net"target="blank">ASP.Net ...
- Android课程---表格布局TableLayout
特别注意:由于表格布局继承自线性布局,因此并不显示表格线 示例代码: <?xml version="1.0" encoding="utf-8"?> ...
- Android布局-TableLayout表格布局
一.表格布局-TableLayout 1.概念 表格布局采用行列的形式来管理UI的控件.表格布局适合于有规则的布局. TableRow,用来管理行,TableRow中的一个空间占据该行的一列.若不用T ...
- 案例:TableLayout表格布局——迷你计算器
计算器可以常用线性布局(LinearLayout)和表格布局(tableLayout).Gridlayout 今天我用的是表格布局 效果如下: 代码如下: <TableLayout xmlns: ...
- TableLayout(表格布局)
表格布局模型以行列的形式管理子控件,每一行为一个TableRow的对象,当然也可以是一个View的对象.TableRow可以添加子控件,每添加一个为一列. TableLayout属性: android ...
- 3月23.CSS表格布局
360表格布局: CSS定义标签: @charset "utf-8";/* CSS Document */.bt1{ border:#309 solid 1px; height:1 ...
- 【转】TableLayout(表格布局)
转自:http://www.cnblogs.com/zhangs1986/archive/2013/01/17/2864536.html TableLayout(表格布局) 表格布局模型以行列的形式管 ...
随机推荐
- Spoken English Practice(I won't succumb to you, not ever again)
绿色:连读: 红色:略读: 蓝色:浊化: 橙色:弱读 下划线_为浊化 口语蜕变(2017/6/28) ...
- iOS论App推送方案
1.APNS介绍(原生推送实现原理) 在iOS平台上,大部分应用是不允许在后台运行并连接网络的.在应用没有被运行的时候,只能通过 Apple Push Notification Service (AP ...
- https://www.cnblogs.com/yuanchenqi/articles/6755717.html
知识预览 一 进程与线程的概念 二 threading模块 三 multiprocessing模块 四 协程 五 IO模型 回到顶部 一 进程与线程的概念 1.1 进程 考虑一个场景:浏览器,网易云音 ...
- 开机启动/etc/rc.local失效无效怎么办?解决方法
开机启动/etc/rc.local失效问题的解决方法 第一种情况:当centOS 随机启动文件 /etc/rc.local 失效时请按如下修改1.echo /etc/rc.local >> ...
- Java基础 - 字符串 String
字符串就是用字符拼接成的文本值,字符串在存储上类似数组,在java语言中把字符串当做对象进行处理 创建字符串 package com.mingri.chapter_02; public class d ...
- Linux学习笔记(6)磁盘分区(LVM)
1.逻辑管理技术LVM的概念 1.1 LVM ,逻辑卷管理,以便扩展管理盘符. PV:物理卷 VG:卷组 LV:逻辑卷 PE(physical Extend):物理扩展(默认4M),就是我们逻辑卷管理 ...
- vue指令详解
一.vue简绍 1. Vue.js是什么 Vue.js也称为Vue,读音/vju:/,类似view,错误读音v-u-e. 版本分为v1.0 和 v2.0 2.Vue.js的特点 1. 是一个构建 ...
- python16_day07【class】
一.初识类 1.类的两种作用:属性引用和实例化 class Garen: #定义英雄盖伦的类,不同的玩家可以用它实例出自己英雄; camp='Demacia' #所有玩家的英雄(盖伦)的阵营都是Dem ...
- 数据结构&算法(一)_堆、栈(堆栈)、队列、链表
堆: ①堆通常是一个可以被看做一棵树的数组对象.堆总是满足下列性质: ·堆中某个节点的值总是不大于或不小于其父节点的值: ·堆总是一棵完全二叉树.将根节点最大的堆叫做最大堆或大根堆,根节点最小的堆叫做 ...
- Educational Codeforces Round 11C. Hard Process two pointer
地址:http://codeforces.com/contest/660/problem/C 题目: You are given an array a with n elements. Each el ...