eclipse提示:
This RelativeLayout layout or its LinearLayout parent is possibly
useless; transfer the background attribute to the other view
但实测都有用,怎么处理这个提示?奉上代码:<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget52"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"android:background="@drawable/beijing_heng"
>
<!-- 横向 -->
<RelativeLayout
android:id="@+id/widget54"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/widget01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/ling_dang"
android:contentDescription="@string/hello"
android:paddingTop="10dip"
>
</ImageView>
<ImageView
android:id="@+id/widget02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/plm"
android:contentDescription="@string/hello"
android:paddingTop="80dip"
>
</ImageView>
<ImageView
android:id="@+id/widget03"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/jiantou_you"
android:contentDescription="@string/hello"
android:paddingTop="150dip"
>
</ImageView>
</RelativeLayout>
</LinearLayout>
这个代码实测都有用的。
This RelativeLayout layout or its LinearLayout parent is possibly
useless; transfer the background attribute to the other view
但实测都有用,怎么处理这个提示?奉上代码:<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget52"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"android:background="@drawable/beijing_heng"
>
<!-- 横向 -->
<RelativeLayout
android:id="@+id/widget54"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/widget01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/ling_dang"
android:contentDescription="@string/hello"
android:paddingTop="10dip"
>
</ImageView>
<ImageView
android:id="@+id/widget02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/plm"
android:contentDescription="@string/hello"
android:paddingTop="80dip"
>
</ImageView>
<ImageView
android:id="@+id/widget03"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/jiantou_you"
android:contentDescription="@string/hello"
android:paddingTop="150dip"
>
</ImageView>
</RelativeLayout>
</LinearLayout>
这个代码实测都有用的。
我的确实有,就在<RelativeLayout的旁边,然后从<RelativeLayout开始一直到最后的</RelativeLayout>的部分是加蓝的
就像你把一个篮子放到另一个篮子里面 再装东西 那最外那那个 不是没有用么