The layout_weight attribute in the last TextView in this layout is being highlighted by lint as causing bad performance. I suspect the name of the lint warning is erroneous as there are no nested weights. There are several stretching views, and I suspect what it means is dependent weighted views.
What's the solution, to build this layout, and avoid this lint warning, and improve performance?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
android:background="@drawable/background_gradient"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/image4"
android:layout_margin="6dp"
android:contentDescription="@string/PLACEHOLDER_TEXT"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
>
<Button
style="@style/dashboard_button"
android:id="@+id/home_management"
android:text="@string/ICON_MANAGEMENT"
/>
<Button
style="@style/dashboard_button"
android:id="@+id/home_calculators"
android:text="@string/ICON_CALCULATORS"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
>
<Button
style="@style/dashboard_button"
android:id="@+id/home_guidelines"
android:text="@string/ICON_GUIDELINES"
/>
<Button
style="@style/dashboard_button"
android:id="@+id/home_faq"
android:text="@string/ICON_FAQ"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
>
<Button
style="@style/dashboard_button"
android:id="@+id/home_refs"
android:text="@string/ICON_REFERENCES"
/>
<Button
style="@style/dashboard_button"
android:text=""
android:visibility="invisible"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_margin="6dp"
>
<TextView
android:text="@string/HOMEPAGE_CONTENT"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:textStyle="bold"
android:textColor="#FFFFFF"
/>
<View
android:layout_width="8dp"
android:layout_height="1dp"
/>
<ImageView
android:id="@+id/home_logo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/image7"
android:contentDescription="@string/PLACEHOLDER_TEXT"
/>
</LinearLayout>
<Button
android:id="@+id/home_web_site"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/HOMEPAGE_FOOTER"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:textSize="12sp"
android:background="@drawable/button_red"
android:layout_margin="6dp"
android:textColor="#FFFFFF"
/>
</LinearLayout>