您的位置:首页 > 其它

【项目笔记】布局文件报错Suspicious size: this will make the view invisible, probably intended for layout_width

2016-07-16 11:16 776 查看


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

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

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
     android:orientation="vertical" >

<ScrollView
android:layout_width="match_parent"
             android:layout_height="0dp"
android:layout_weight="1" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<FrameLayout
android:id="@+id/fl_appinfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="@drawable/list_item_bg_normal" >
</FrameLayout>

</LinearLayout>
</ScrollView>

<FrameLayout
android:id="@+id/fl_download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/detail_bottom_bg" >
</FrameLayout>

</LinearLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: