加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

Android 表格布局 TableLayout

发布时间:2020-12-15 07:16:23 所属栏目:Java 来源:网络整理
导读:属性介绍 stretchColumns: 列被拉伸 shrinkColumns: 列被收缩 collapseColumns: 列被隐藏 举例测试 TableLayout android:id ="@+id/table1" android:layout_width ="fill_parent" android:layout_height ="wrap_content" android:stretchColumns ="0" Tab

属性介绍

stretchColumns:列被拉伸

shrinkColumns:列被收缩

collapseColumns:列被隐藏

举例测试

    <TableLayout
        android:id="@+id/table1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:stretchColumns="0" >

        <TableRow
            ="@+id/row1"
            android:layout_width
            android:layout_height="wrap_content" >

            TextView
                ="@+id/textView"
                android:layout_width
                android:layout_height
                android:background="#fd8d8d"
                android:text="測試表格布局"
                android:textColor="#000000" />
        </TableRow>
    TableLayout>

    ="@+id/table2"
        android:shrinkColumns="0,1,2,3" ="@+id/row2"Button
                ="@+id/button1"="button1" />

            ="@+id/button2"="button2" ="@+id/button3"="button3" ="@+id/button4"="button4" ="@+id/table3"="@+id/row3"EditText
                ="@+id/editText"="查詢" >

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读