zoukankan      html  css  js  c++  java
  • android TableLayout

    <!-- 定义基础布局TableLayout -->
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin" >
        <!-- 定义TableRow控件,代表第一行 -->
        <TableRow android:orientation="horizontal" >
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:textSize="20dp"
                android:layout_weight="1"
                android:text="学生姓名" />
    
            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:textSize="20dp"
                android:gravity="center"
                android:text="数学成绩" />
    
            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:textSize="20dp"
                android:gravity="center"
                android:text="语文成绩" />
        </TableRow>
        <!-- 定义TableRow控件,代表第二行 -->
        <TableRow android:orientation="horizontal" >
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="张三" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="90" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="83" />
        </TableRow>
        <!-- 定义TableRow控件,代表第三行 -->
        <TableRow android:orientation="horizontal" >
    
            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="李四" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="83" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="83" />
        </TableRow>
        <!-- 定义TableRow控件,代表第四行 -->
        <TableRow android:orientation="horizontal" >
    
            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="王五" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="81" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:text="82" />
        </TableRow>
    
    </TableLayout>
  • 相关阅读:
    ios15--综合小例子
    ios ionic 装平台 笔记
    ios14--购物车优化2
    ios13--购物车优化
    ios--plist
    ios12--简易购物车
    ios11--UIButton
    Android Json的使用(2) 使用Jackson解析和生成json
    快速Android开发系列网络篇之Retrofit
    关于XUtils框架细解
  • 原文地址:https://www.cnblogs.com/gisoracle/p/5011969.html
Copyright © 2011-2022 走看看