WEB开发网
开发学院手机开发Android 开发 TableLayout 中 stretchColumns 的用法 阅读

TableLayout 中 stretchColumns 的用法

 2010-03-24 05:21:00 来源:WEB开发网   
核心提示:<?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:
<?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..."

1 2 3  下一页

Tags:TableLayout stretchColumns 用法

编辑录入:coldstar [复制链接] [打 印]
赞助商链接