Android error inflating class on xml

android, custom-controls, user-interface, view, xml

Solution

You just need view to not be capitalized -

<view 
    class="touchcare.idealogix.android.FixedViewFlipper"
    android:id="@+id/flipperAdd"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    >
</view>

It's perfectly valid syntax and is how its done in a lot of the google apps

Problem

I created a class where extends from ViewFlipper. When I try to instantiate on xml, it gives me this "error inflating class on xml" FixedViewFlipper ``` public FixedViewFlipper(Context context) { super(context); } public FixedViewFlipper(Context context, AttributeSet attrs) { super(context, attrs); } ``` Xml ``` <View class="com.touchcare.idealogix.android.FixedViewFlipper" android:id="@+id/flipperAdd" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" > </View> ``` Logcat EDIT: I am using TabActivity at my MainActivity.

Original source