• 寒假学习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>

    运行截图:

  • 相关阅读:
    python3 爬取西祠代理IP数据
    电影天堂电影链接爬取
    腾讯招聘信息爬取
    妹子图图片爬取
    我爱我家数据爬取
    今日头条网页图片爬取
    快乐的正则一只
    百思不得姐首页爬取
    雪球网数据爬取
    Python Day79 form表单
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14905793.html
Copyright © 2020-2023  润新知