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

    拉伸列,让该列填满这一行所有的剩余空间

    <TableLayout    
        android:id="@+id/TableLayout2"    
        android:layout_width="fill_parent"    
        android:layout_height="wrap_content"    
        android:stretchColumns="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" />                 
        </TableRow>    
    </TableLayout>  

    收缩列

    <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>

    (在菜鸟教程学习)

  • 相关阅读:
    HTTP 协议(一)之基本概念入门
    聊聊 PHP 私有组件以及如何创建自己的 PHP 组件 (转)
    组件、框架、Packagist、Composer
    laravel 资源篇
    190318 面试题记录
    Http 协议
    python中全局变量的修改
    python lamba表达式
    python 按位置关系输出矩阵元素
    python 三目运算
  • 原文地址:https://www.cnblogs.com/qiangini/p/14905090.html
Copyright © 2011-2022 走看看