<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1">
<!--
android:stretchColumns="1"是设置 TableLayout所有行的第二列为扩展列。
也就是说如果每行都有三列的话,剩余的空间由第二列补齐
-->
<TableRow>
<!-- 从第二列开始填写 -->
<TextView
android:layout_column="1"
android:text="Open..."
android:padding="3dip" />
<!-- 字符四周到TextView的 空白边的大小 -->
<!-- 设置TextView内字符的对其方式 此为右对齐 与layout_gravity的区别-->
<TextView
android:text="Ctrl-O"
android:gravity="right"
android:padding="3dip" />
</TableRow>
<TableRow>
<TextView
android:layout_column="1"
android:text="Save..."
android:padding="3dip" />
<TextView
android:text="Ctrl-S"
android:gravity="right"
android:padding="3dip" />
</TableRow>
<TableRow>
<TextView
android:layout_column="1"
android:text="Save As..."
android:padding="3dip" />
<TextView
android:text="Ctrl-Shift-S"
android:gravity="right"
android:padding="3dip" />
</TableRow>
<!-- 加一个分割线 线的高度为2 View是TextView的父类颜色 -->
<View
android:layout_height="2dip"
android:background="#FF909090" />
<TableRow>
<TextView
android:text="X"
android:padding="3dip" />
<TextView
android:text="Import..."
android:padding="3dip" />
</TableRow>
<TableRow>
<TextView
android:text="X"
android:padding="3dip" />
<TextView
android:text="Export..."
android:padding="3dip" />
<TextView
android:text="Ctrl-E"
android:gravity="right"
android:padding="3dip" />
</TableRow>
<View
android:layout_height="2dip"
android:background="#FF909090" />
<TableRow>
<TextView
android:layout_column="1"
android:text="Quit"
android:padding="3dip" />
</TableRow>
</TableLayout>
分享到:
相关推荐
主要介绍了Android TableLayout中stretchColumns、shrinkColumns用法的相关资料,需要的朋友可以参考下
此文档系统的介绍了TableLayout的使用方法,并有使用例子。
TableLayout的基本用法,选项卡
java TableLayout布局
TableLayout,实现动态添加和删除行,判断行中的数据是否含有空值,可以手动地输入数据,也可以选择数据添加在表格中,并实现统计表格中的数据。
android中利用tablelayout实现表格效果
安卓 tablelayout布局实例..欢迎下载学习
TableLayout实现gridview嵌套gridview效果.md
本文介绍 Android 界面开发中最基本的四种布局LinearLayout、RelativeLayout、FrameLayout、TableLayout 的使用方法及这四种布局中常用的属性。 LinearLayout 线性布局,布局中空间呈线性排列 RelativeLayout 相对...
andorid tablelayout实例 疯狂Android讲义
利用TableLayout自定义可点击表格
018集-TableLayout视频教程,讲解比较生动详细。
android 利用TableLayout自动生成表格
TableLayout 简单程序,但不常用的话容易忘记。特此发布,以备不时之需
本文初步讲述了Android中TableLayout的应用,对Android初学者有一定的学习借鉴价值。具体如下: TableLayout跟TableLayout 是一组搭配使用的布局,TableLayout置底...本文主要介绍TableLayout的基本使用方法。 TableLay
TableLayout 简单程序,但不常用的话容易忘记。特此发布,以备不时之需
TableLayout+ViewPager+Fragment原生高级控件开发的一个可滑动的标题栏索引
Android使用TableLayout动态布局实例: http://blog.csdn.net/lk_blog/article/details/7436380
看到很多在安桌上做表格的例子,总感觉不太理想,所以自己做了一个,感觉比较好用,供参考。 (图片在哪儿上传?)