I'm trying to implement an custom component by extends TextView and
override all counstructor, but I always get "Error inflating class"
exception when I run my program in the emulator.
What's worng with my code?
Here is my custom component source code:
==================
import android.widget.TextView;
import android.content.Context;
import android.util.AttributeSet;
public class MaidDialogView extends TextView
{
public MaidDialogView (Context context)
{
super (context);
}
public MaidDialogView (Context context, AttributeSet attrs)
{
super (context, attrs);
}
public MaidDialogView (Context context, AttributeSet attrs, int
defStyle)
{
super (context, attrs, defStyle);
}
}
==================
And here is my layout XML:
==================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<view class="org.bone.MaidDialogView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4"
android:text="Hello World, MaidroidGTD"/>
</LinearLayout>
==================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---