5

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>
MikeC
  • 725
  • 8
  • 19
  • What is the superclass of com.SpaceShot.single? Depending on that you need to provide the appropriate public constructor with parameters needed by the inflate logic – JScoobyCed Mar 12 '12 at 02:54

1 Answers1

15

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

Community
  • 1
  • 1
JScoobyCed
  • 10,203
  • 6
  • 34
  • 58