2011-12-03 4 views
0

私はlayoutoptを使用してレイアウトを強化し、レイアウトの効率を高め、その非効率性を特定しました。私は以下のようなメッセージを取得するには、layoutopt出力の意味

<RelativeLayout       //  line 179 
    android:id="@+id/rview4"     //  line 180 
    android:layout_width="fill_parent"  //  line 181 
    android:layout_height="162dp" >   //  line 182 

     <ListView android:id="@+id/ListView01" 
     android:layout_height="fill_parent"  
     android:layout_marginLeft="5dp"   
     android:cacheColorHint="#00000000"       
     android:transcriptMode="alwaysScroll" android:layout_width="160dip"/> 

     <RelativeLayout android:id="@+id/coverFlowBlock" 
     android:layout_width="wrap_content" 
     android:layout_toRightOf="@+id/ListView01" 
     android:layout_marginRight="5dp" 
     android:layout_height="wrap_content"> 

      <ImageView android:id="@+id/spacer3" 
      android:layout_width="fill_parent" 
      android:layout_alignParentBottom="true" 
      android:layout_height="5dp" 
      android:src="@drawable/spacer" />    

      <ImageView android:id="@+id/spacer2" 
      android:layout_width="fill_parent" 
      android:layout_height="5dp" 
      android:src="@drawable/spacer" ></ImageView> 

      <com.pixecon.CoverFlow android:id="@+id/coverFlow"     
      android:layout_width="310dp" 
      android:layout_below="@+id/spacer2" 
      android:layout_above="@+id/spacer3" 
      android:layout_height="fill_parent" /> 

     </RelativeLayout> 

    </RelativeLayout>        // line 215 

出力layoutoptRelativeLayoutはおそらく役に立たないと言うのは次のよう

F:\Trunk\AndroidApp\Pixecon\res\layout-land\take_photo.xml 
182:215 This RelativeLayout layout or its RelativeLayout parent is possibly useless 

レイアウトファイルtake_photo.xmリットルであるので、私は、この相対的なレイアウトを削除する必要があるでしょうか? 私はそれが正確に何を意味するのか混乱しています。

答えて

0

ここにこれを読むだけで、最も重要な部分を残して、あなたのxmlを可能な限り最小限に抑えるようにしてください:このようなエラーが出力Layout optimization

は、未使用または放棄された命令 アドバイスの結果です。これは比較的大きなxmlファイルの非常に一般的な問題です。時には紛失して動き回ることがあるため、多くの未使用コードが発生します。

関連する問題