2010-03-30 94 views
1

我有一個由LinearLayouts組成的ListView。每個內部是一個ImageView,TextView和另一個ImageView水平佈局:Android佈局文件中的所有小部件都需要layout_width和layout_height嗎?

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    > 
      <ImageButton 
       android:id="@+id/thumbnail" 
       android:background="@color/white" 
       android:paddingTop="10dip" 
       android:paddingLeft="8dip" 
       android:paddingBottom="10dip" 
       /> 
      <TextView 
       android:id="@+id/title" 
       android:background="@color/white" 
       android:textColor="@color/bntext" 
       android:paddingTop="10dip" 
       android:paddingLeft="8dip" 
       /> 
      <ImageButton 
       android:src="@drawable/green_arrow_small" 
       android:background="@color/white" 
       /> 
</LinearLayout> 

回答

2

是的。這應該是崩潰。

相關問題