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>

    运行截图:

  • 相关阅读:
    Git基本操作二
    Git基本操作一
    Mysql查询一
    接口的token验证
    Laravel模型的一些小技巧
    AOP编程思想实现全局异常处理
    5.4 RegExp类型
    5.4.1 RegExp实例属性
    5.4.2 RegExp实例方法
    5.4.3 RegExp构造函数属性
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14905793.html
Copyright © 2011-2022 走看看