RelativeLayout
나에게이를 얻을 내가 xml
아래에 있습니다이 RelativeLayout 레이아웃 또는 LinearLayout 부모는 쓸모 없습니까?
경고 :
This RelativeLayout layout or its LinearLayout parent is possibly useless
XML 파일 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/heading"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout <--- This RelativeLayout layout or its LinearLayout parent is possibly useless -->
android:id="@+id/dings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dip">
<ProgressBar
android:id="@+id/prgDownload"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="32dip"/>
<TextView
android:id="@+id/txtDownload"
android:layout_width="fill_parent"
android:layout_height="32dip"
android:gravity="center"
android:text="..."
android:textColor="#afafaf"
android:textSize="18dip"
android:textStyle="bold" />
</RelativeLayout>
</LinearLayout>
공지 사항 : 내 LinearLayout
이 vertical
하지만 내가 사용하는 경우 그것은 에서로 변환됩니다..
정확하게 말합니다. LinearLayout은 RelativeLayout이므로 포함되지 않습니다. 그냥 제거하십시오. – Simon
우리가 이해할 수없는 정확한 문제는 무엇입니까? 이미 부모 layou가 쓸모 없다고 제안하는 IDE는 선형 레이아웃을 제거하고 해당 레이아웃을 그대로 유지하고 자녀의 부모가되도록해야합니다. 선형 레이아웃을 부모 –