1
我有一個xml文件,我試圖在自定義ListView
中使用。 的xml
文件看起來象下面這樣:android.view.InflateException:二進制XML文件行#24
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="5dp" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="50dp"
android:layout_height="50dp"
android:paddingRight="10dp"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_toRightOf="@id/imageView1"
android:textSize="25dp"
android:gravity="center"/>
<ImageView
android:id="@+id/imageView2"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignBottom="@id/textView1"
android:layout_alignParentRight="true"
android:layout_marginRight="25dp"
android:baseline="@id/imageView1"
android:src="@drawable/offline" />
</RelativeLayout>
我與我的自定義列表視圖膨脹,但它顯示
02-28 15:50:08.363: E/AndroidRuntime(19777): android.view.InflateException: Binary XML file line #24: Error inflating class <unknown>
Post full full XML code。而且,在線編號24 –
是什麼在你的正確的代碼,你如何膨脹你的自定義適配器的XML。然後你可以解決你的問題。 –