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>

    (在菜鸟教程学习)

  • 相关阅读:
    Android Touch事件的分发过程
    使用runOnUiThread更新UI
    Sqlite访问数据库很慢的问题
    资源收集
    mongdb shard集群均衡导致宿主机CPU飙到100%处理
    Harbor安装
    springboot 启动脚本获取pid问题
    androidstudio build 时间太长处理
    修改 Docker 的 daemon.json后启动失败
    关于在centos7 64为引用android so引发的问题修复
  • 原文地址:https://www.cnblogs.com/qiangini/p/14905090.html
Copyright © 2011-2022 走看看