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>
  • 相关阅读:
    springmvc完成ajax功能以及返回字符串出现乱码的解决方法
    修改controller保存数据的作用域
    controller的数据保存
    sringmvc接收日期参数
    常见的几种HandlerMapping
    springmvc的流程
    mvc的流程
    为实体类定义别名以及批量为某个包里面的实体类设置别名
    添加日志文件
    JSP页面添加当前时间
  • 原文地址:https://www.cnblogs.com/gisoracle/p/5011969.html
Copyright © 2011-2022 走看看