zoukankan      html  css  js  c++  java
  • andorid 表格布局

    tablelayout.xml表格布局

    <?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:stretchColumns="1,2">
        <!--stretchColumns   设置自动拉伸列的序号-->
        <!--TableRow   表格行-->
        <TableRow>
            <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="账号:"
            />
            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="请输入用户名"
                android:layout_span="2"
                />
            <!--layout_span  跨列-->/>
    
        </TableRow>
        <TableRow>
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="密码:"
                />
            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="请输入密码"
                android:password="true"
                android:layout_span="2"
                />
            <!--password  是否是密码框-->
    
        </TableRow>
        <TableRow>
            <Button
                android:layout_width="odp"
                android:layout_height="wrap_content"
                android:text="登陆"
                android:layout_weight="1"
                />
            <!--layout_weight  权重-->
            <Button
                android:layout_width="odp"
                android:layout_height="wrap_content"
                android:text="注册"
                android:id="@+id/button2"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="odp"
                android:layout_height="wrap_content"
                android:text="取消"
                android:layout_weight="1"
                />
        </TableRow>
    
    </TableLayout>

  • 相关阅读:
    Python深浅拷贝&垃圾回收&with语句
    面向对象
    三器(装饰器,生成器,迭代器)
    Redis数据类型&优缺点&持久化方式
    localStroge和sessionStorge
    redis哨兵&codis
    Redis分布式锁
    技术点剖析
    【牛客网】牛客练习赛4 A Laptop【树状数组+离散化】
    组合数有关的公式及常用求和【数学--排列组合】
  • 原文地址:https://www.cnblogs.com/cuikang/p/5317192.html
Copyright © 2011-2022 走看看