I get this exception when I try to inflate
07-22 19:15:39.903: ERROR/AndroidRuntime(3810): Caused by: java.lang.ClassCastException: android.widget.RelativeLayout
I have a base class:
public class UIBase extends RelativeLayout {}
And a more specific class:
public class Countdown extends UIBase {}
Then I try to inflate and it exceptions:
UIBase newView = (UIBase) inflater.inflate(layoutId, parent, true);
Here's the XML file:
<?xml version="1.0" encoding="utf-8"?>
<com.Countdown xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/countdown"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/countdownText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="0" />
</com.Countdown>
Does anyone know what I'm doing wrong?