YXTS122 2020-12-15 04:37 采纳率: 100%
浏览 16
已采纳

改了很多次这几个布局一直不显示

<RelativeLayout 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"
    tools:context="com.example.tablelayoutactivity.TableLayoutActivity"
    android:orientation="vertical" >
    <RelativeLayout 
        android:id="@+id/r1"   
        android:layout_width="fill_parent"  
        android:layout_height="45dp"  
        android:gravity="center_vertical"
        android:layout_alignParentTop="true" >  
   
        <TextView    
            android:layout_width="80dp"  
            android:layout_height="wrap_content"  
            android:layout_centerVertical="true"   
            android:text="装车扫描"  
            android:textStyle="bold" 
            android:textSize="20dip" />  
   
        <TextView  
            android:layout_width="wrap_content"  
            android:layout_height="wrap_content"  
            android:layout_centerInParent="true"  
            android:text="0"  
            android:textStyle="bold"  
            android:textSize="20sp" />  
   
        <TextView   
            android:layout_width="100dp"  
            android:layout_height="wrap_content"  
            android:layout_alignParentRight="true"  
            android:layout_centerVertical="true"  
            android:layout_marginRight="5dp"
            android:textStyle="bold"
            android:text="济南快运分拨"    />  
    </RelativeLayout>  
    
    <RelativeLayout 
        android:id="@+id/r2"
        android:layout_below="@+id/r1"
        android:layout_width="match_parent"
      android:orientation="horizontal"
      android:layout_height="wrap_content">
        <TextView
                android:text="离发车时间还有:181:11"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true" />
        
        
    </RelativeLayout>
     
    <TableLayout 
        android:id="@+id/TableLayout01"
        android:layout_width="wrap_content"
        android:layout_height="200dp"
        android:layout_below="@+id/r2"
        android:stretchColumns="*"
        android:background="#DEDCD2">
        <TableRow 
            android:background="#DEDCD2"
            android:layout_margin="0.5dip">
            <TextView
                android:text="运单号"
                android:textSize="10dip" />
            <TextView
                android:text="类型"
                android:textSize="10dip" />
            <TextView
                android:text="开单"
                android:textSize="10dip" />
            <TextView
                android:text="扫描"
                android:textSize="10dip" />
            <TextView
                android:text="库存"
                android:textSize="10dip" />
        </TableRow>
    </TableLayout>
    
    <RelativeLayout 
        android:id="@+id/r3"
        android:layout_above="@+id/r4"
        android:layout_width="match_parent"
      android:orientation="horizontal"
      android:layout_height="wrap_content">
        <TextView
                android:text="总票/件:155/494"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        <TextView
                android:text="实票/件:104/350"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        
    </RelativeLayout>
    
    <RelativeLayout
        android:id="@+id/r4" 
        android:layout_above="@+id/r5"
        android:layout_width="match_parent"
      android:orientation="horizontal"
      android:layout_height="wrap_content">
        <TextView
                android:text="总重/体:10958.4/64.15"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        <TextView
                android:text="实重/体:8054.74/45.64"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        
    </RelativeLayout>
    <RelativeLayout 
        android:id="@+id/r5"
        android:layout_above="@+id/r6"
        android:layout_width="match_parent"
      android:orientation="horizontal"
      android:layout_height="wrap_content">
        <TextView
                android:text="时效总重/体:3729.9/24.8"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        <TextView
                android:text="时效实重/体:2793.5/18.45"
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        
    </RelativeLayout>
     
    <RelativeLayout
        android:id="@+id/r6"
      android:layout_width="match_parent"
      android:gravity="center_vertical"
      android:layout_height="50dp"
      android:background="#aa1885d9"
      android:layout_alignParentBottom="true"
      >
        <Button
            android:layout_centerVertical="true" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="返回"/>
    <Button
        android:layout_centerInParent="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="刷新"/>
    <Button
        android:layout_alignParentRight="true"  
            android:layout_centerVertical="true"  
            android:layout_marginRight="5dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="提交"/>
  </RelativeLayout>
 
     
 
</RelativeLayout>

 

  • 写回答

3条回答 默认 最新

  • 中控易动 企业官方账号 2020-12-15 09:37
    关注

    之前好像已经回答过了,布局重叠了!!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥100 有人会搭建GPT-J-6B框架吗?有偿
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名