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>

    (在菜鸟教程学习)

  • 相关阅读:
    2020年7月3日 查找算法 代码
    QList 和QStringList为空 at()的错误
    网络编程TCP
    02#2位带操作
    04#认识指针
    03#指针内存图//拓展大小端序
    02#循环控制+分支控制+goto标签//拓展3目运算符和逗号运算符
    01#c语言基础内容
    输入的竖线变横
    Keil打包工程
  • 原文地址:https://www.cnblogs.com/qiangini/p/14905090.html
Copyright © 2011-2022 走看看