zoukankan      html  css  js  c++  java
  • 2021/2/16

    TableLayout(表格布局)

    常用的三个属性

    android:collapseColumns:设置需要被隐藏的列的序号
    android:shrinkColumns:设置允许被收缩的列的列序号
    android:stretchColumns:设置运行被拉伸的列的列序号

    隐藏列

    <TableLayout  
        android:id="@+id/TableLayout2"  
        android:layout_width="fill_parent"  
        android:layout_height="wrap_content"  
        android:collapseColumns="0,2" >  
    
        <TableRow>  
    
            <Button  
                android:layout_width="wrap_content"  
                android:layout_height="wrap_content"  
                android:text="one" />  
    
            <Button  
                android:layout_width="wrap_content"  
                android:layout_height="wrap_content"  
                android:text="two" />  
    
            <Button  
                android:layout_width="wrap_content"  
                android:layout_height="wrap_content"  
                android:text="three" />  
    
            <Button  
                android:layout_width="wrap_content"  
                android:layout_height="wrap_content"  
                android:text="four" />  
    
            <Button  
                android:layout_width="wrap_content"  
                android:layout_height="wrap_content"  
                android:text="five" />  
        </TableRow>  
    </TableLayout>

    从菜鸟教程学习

  • 相关阅读:
    [离散数学II]2017.5.9
    mysql内连接、左连接、右连接
    Android平台介绍
    软技能(面试)1
    流程控制练习题
    函数:算法
    linux系统文件
    App测试需注意
    python-循环
    python-正则表达式
  • 原文地址:https://www.cnblogs.com/qiangini/p/14905084.html
Copyright © 2011-2022 走看看