zoukankan      html  css  js  c++  java
  • 寒假学习day19

    今天学习了表格布局的shrinkColumns(收缩列)

    步骤:这里为了演示出效果,设置了5个按钮和一个文本框,在最外层的TableLayout中添加以下属性: android:shrinkColumns = "1"

    设置第二个列为可收缩列,代码如下:

    <TableLayout  
        android:id="@+id/TableLayout2"  
        android:layout_width="fill_parent"  
        android:layout_height="wrap_content"  
        android:shrinkColumns="1" >  
    
        <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" />  
    
            <TextView  
                android:layout_width="wrap_content"  
                android:layout_height="wrap_content"  
                android:text="文本XX" />  
        </TableRow>  
    </TableLayout>

    运行截图:

  • 相关阅读:
    编译原理是什么?有什么用?
    词频统计
    python基础综合练习
    熟悉常用的Linux操作
    大数据概述
    c语言程序的文法分析
    词法分析实验报告
    未完成的词法分析
    一名初学者对编译原理的看法
    使用Bootstrap.css 中IE下页面加载过慢问题
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14905793.html
Copyright © 2011-2022 走看看