Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 此LinearLayout布局或其FrameLayout父级无效;将“背景”属性转移到其他视图_Android - Fatal编程技术网

Android 此LinearLayout布局或其FrameLayout父级无效;将“背景”属性转移到其他视图

Android 此LinearLayout布局或其FrameLayout父级无效;将“背景”属性转移到其他视图,android,Android,及 有人知道我该怎么做才能让这条消息消失吗?我认为这是由于FrameLayout、1st LinerLayout和2nd LinearLayout在HorizontalScrollView中没有解决任何问题。您有一个单独的组件(行)垂直线性布局,其中包含另一个线性布局。这没有任何意义,因为布局是多个组件的容器。如果只有一个组件,则该容器是冗余的,可以直接由它所持有的单个组件替换 同样,第二个线性布局也没有意义,它只包含一个组件水平滚动视图。唯一重要的是现在需要在组件上指定“80.0dip”属性


有人知道我该怎么做才能让这条消息消失吗?

我认为这是由于FrameLayout、1st LinerLayout和2nd LinearLayout在HorizontalScrollView中没有解决任何问题。

您有一个单独的组件(行)垂直线性布局,其中包含另一个线性布局。这没有任何意义,因为布局是多个组件的容器。如果只有一个组件,则该容器是冗余的,可以直接由它所持有的单个组件替换

同样,第二个
线性布局
也没有意义,它只包含一个组件
水平滚动视图
。唯一重要的是现在需要在组件上指定“80.0dip”属性

因此,您的布局是不必要的复杂。
FrameLayout
的内容可以简单地重写为

This HorizontalScrollView layout or its LinearLayout parent is useless


生成的代码运行速度更快,更易于理解。

您使用的FrameLayout仅承载LinearLayout,这使它变得无用。如果它无用,请将其删除。
This LinearLayout layout or its FrameLayout parent is useless; transfer the background attribute to the other view
This HorizontalScrollView layout or its LinearLayout parent is useless
<HorizontalScrollView
   android:layout_width="fill_parent"
   android:layout_height="80.0dip"
   android:paddingBottom="1.0dip"
   android:paddingTop="1.0dip"
   android:scrollbars="none" >
   <include layout="@layout/quickactions_buttons_part" />
</HorizontalScrollView>