zoukankan      html  css  js  c++  java
  • 【项目笔记】布局文件报错Suspicious size: this will make the view invisible, probably intended for layout_width

    写着写着就懵逼了,一直以为布局文件没写错啊,horizontal就是竖直啊,原来布局文件报错,不仅仅需要从报错的地方解决问题,还需要从其他地方去分析。

    很明显是方向orientation选错了,应该写成vertical 才是竖直方向而不是horizontal

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3     android:layout_width="match_parent"
     4     android:layout_height="match_parent"
     5     android:orientation="vertical" >
     6 
     7 
     8         <ScrollView
     9             android:layout_width="match_parent"
    10             android:layout_height="0dp"
    11             android:layout_weight="1" >
    12 
    13             <LinearLayout
    14                 android:layout_width="match_parent"
    15                 android:layout_height="wrap_content"
    16                 android:orientation="vertical" >
    17 
    18                 <FrameLayout
    19                     android:id="@+id/fl_appinfo"
    20                     android:layout_width="match_parent"
    21                     android:layout_height="wrap_content"
    22                     android:layout_marginLeft="5dp"
    23                     android:layout_marginRight="5dp"
    24                     android:background="@drawable/list_item_bg_normal" >
    25                 </FrameLayout>
    26 
    27             </LinearLayout>
    28         </ScrollView>
    29 
    30     <FrameLayout
    31         android:id="@+id/fl_download"
    32         android:layout_width="match_parent"
    33         android:layout_height="wrap_content"
    34         android:background="@drawable/detail_bottom_bg" >
    35     </FrameLayout>
    36 
    37 </LinearLayout>
  • 相关阅读:
    一、docker安装CentOS7
    c#使用资源文件完成国际化
    .netcore 读取ansi编码
    省市区数据库
    .netcore2.0发送邮件
    使用py,根据日志记录自动生成周报
    mysql监控每一条执行的sql语句
    根据json生成c#实体类
    使用.net core efcore根据数据库结构自动生成实体类
    winform,同个程序只允许启动一次
  • 原文地址:https://www.cnblogs.com/johnsonwei/p/5675856.html
Copyright © 2011-2022 走看看