• android TableLayOut画表格


     <TableRow
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@drawable/tableline"
            android:orientation="horizontal"
            android:showDividers="middle|beginning|end">
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="#f8f8f8"
                android:gravity="center"
                android:padding="10dp"
                android:text="1"
                android:textColor="#434343"
                android:textSize="27px" />
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="1dp"
                android:layout_weight="1"
                android:background="#f8f8f8"
                android:gravity="center"
                android:padding="10dp"
                android:text="2"
                android:textColor="#434343"
                android:textSize="27px" />
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="1dp"
                android:layout_weight="1"
                android:background="#f8f8f8"
                android:gravity="center"
                android:padding="10dp"
                android:text="3"
                android:textColor="#434343"
                android:textSize="27px" />
        </TableRow>
    
        <TableRow
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@drawable/tableline"
            android:orientation="horizontal"
            android:showDividers="middle|beginning|end">
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="这个任务比较重"
                android:textColor="#434343"
                android:textSize="15dp" />
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="1dp"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="任务安排任务安排任务安排任务安任务安排任务任务安排任务任务安排任务排任务安排"
                android:textColor="#434343"
                android:textSize="15dp" />
        </TableRow>
    
        <TableRow
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@drawable/tableline"
            android:orientation="horizontal"
            android:showDividers="middle|beginning|end">
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="2"
                android:textColor="#434343"
                android:textSize="15dp" />
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="1dp"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="2台45亿欧"
                android:textColor="#434343"
                android:textSize="15dp" />
        </TableRow>
    
        <TableRow
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@drawable/tableline"
            android:orientation="horizontal"
            android:showDividers="middle|beginning|end">
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="2"
                android:textColor="#434343"
                android:textSize="15dp" />
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="1dp"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="1111"
                android:textColor="#434343"
                android:textSize="15dp" />
        </TableRow>
    
        <TableRow
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@drawable/tableline"
            android:orientation="horizontal"
            android:showDividers="middle|beginning|end">
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="0"
                android:textColor="#434343"
                android:textSize="15dp" />
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="1dp"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="2"
                android:textColor="#434343"
                android:textSize="15dp" />
        </TableRow>
    
        <TableRow
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="@drawable/tableline"
            android:orientation="horizontal"
            android:showDividers="middle|beginning|end">
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="2345"
                android:textColor="#434343"
                android:textSize="15dp" />
    
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="1dp"
                android:layout_weight="1"
                android:background="@color/white"
                android:gravity="center"
                android:padding="10dp"
                android:text="3"
                android:textColor="#434343"
                android:textSize="15dp" />
        </TableRow>
    </TableLayout>
    tableline划线
    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
           android:shape="rectangle">
        <solid android:color="#00f" />
        <size
            android:height="1dp"
            android:width="1dp" />
    </shape>
    

  • 相关阅读:
    【汇编程序】出地址为BUF的5个字符数组的内容之和
    Ugly Number
    Best Time to Buy and Sell Stock IV****
    Best Time to Buy and Sell Stock III
    Best Time to Buy and Sell Stock
    Best Time to Buy and Sell Stock II
    House Robber II
    Contain Duplicate III*******
    Contain Duplicate II
    Contain Duplicate
  • 原文地址:https://www.cnblogs.com/hualuoshuijia/p/9661102.html
Copyright © 2020-2023  润新知