Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - android.view.InflateException with a custom view

Tags:

android

Hi i keep getting this error its an android.view.InflateException at line #9 xml

Heres my xml:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<com.SpaceShot.single android:id="@+id/single1"
 android:layout_width="wrap_content" 
 android:layout_height="wrap_content">

 </com.SpaceShot.single>

<ListView android:id="@+id/highScores"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content">
</ListView>
</FrameLayout>
like image 539
MikeT Avatar asked Mar 12 '12 02:03

MikeT


1 Answers

Have you looked at this similar error? In that case it says you should have in your custom UI item 2 constructors:
- one with Context parameter
- and one with Context and AttributeSet

like image 168
JScoobyCed Avatar answered Nov 03 '22 15:11

JScoobyCed