Hi all.

I have built an empty custom view as follows:

public class MyView extends View {

        public MyView(Context context, AttributeSet attrs) {
                super(context, attrs);
        }

        @Override
        protected void onDraw(Canvas canvas) {
                super.onDraw(canvas);
        }
}

I would like to use my custom view to create a home application widget
(i.e. a class extending AppWidgetProvider), which will ultimately
consist of some buttons, a text field and my custom view.

In the main layout of my app I call it as follows, i.e.

        <com.example.widget.MyView android:id="@+id/my_widget"
                android:layout_gravity="left"
                android:layout_height="fill_parent"
                android:layout_width="wrap_content"/>

but when placing the widget on the home screen I get the following
error:

Error inflating AppWidget
AppWidgetProviderInfo(provider=ComponentInfo{com.example.widget/
com.example.widget.MyWidget}

Could anyone shed some light on this?

Cheers,

SegioL

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to