zoukankan      html  css  js  c++  java
  • Android笔记之TableLayout布局

    1、每一个TableLayout 可以包含多个tablerow,每个tablerow即为一行,每个tablerow又可以包含多个控件,每个控件作为一列

    2、整个表格的宽度由父容器android:layout_width指定

    3、一个列的宽度由该列最宽的那个单元格

     <TableLayout
            android:id="@+id/tablelayout1"
            android:background="#efefbc"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" 
           >
     <TableRow
                android:layout_width="match_parent"
                android:background="#ffffcc99"
                android:layout_height="wrap_content">
    .......
    </TableRow>

    .......

    </TableLayout>

    1、列与列之间的竖线:

     <View
                        android:layout_width="1px"
                        android:layout_height="fill_parent"
                        android:background="#000000"/>

    2、行与行之间的横线:

     <View
                        android:layout_width="fill_parent"
                        android:layout_height="1px"
                        android:background="#000000"/>

    3、调整单元格之间的间距:单元格使用padding或margin

    Done!

  • 相关阅读:
    Python基础(2)
    Python基础(3)
    Python基础(1)
    [日本语]单词1
    【.Net】 C#参数数组与函数重载
    pyenv
    Pip批量安装/卸载包
    Xcode中模拟器慢
    iPhone的设备名转换
    在python命令行执行sudo命令
  • 原文地址:https://www.cnblogs.com/xingyyy/p/3298473.html
Copyright © 2011-2022 走看看