<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff000000"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="80.0dip"
android:orientation="vertical" >
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom="1.0dip"
android:paddingTop="1.0dip"
android:scrollbars="none" >
<include layout="@layout/quickactions_buttons_part" />
</HorizontalScrollView>
</LinearLayout>
but I get this warnings
This LinearLayout layout or its FrameLayout parent is useless; transfer the background attribute to the other view
and
This HorizontalScrollView layout or its LinearLayout parent is useless
Does anyone have any idea what can i do that this message wil go away?
You have a single component (row) vertical linear layout, containing another linear layout. This does not make any sense as layout is a container for the multiple components. If there is only one component, such container is redundant and can be replaced directly by the single component it holds.
Same way, the second
LinearLayoutalso makes no sense, holding a single component, theHorizontalScrollView. The only thing may matter there is the “80.0dip” property that needs to be specified on the component now.Hence your layout is unnecessary sophisticated. The contents of the
FrameLayoutcan be rewritten simpler asresulting the code that both runs faster and is easier to understand.