title: Android: AppWidget with custom view not working
body: <p>I am creating a appwidget that consists of a single custom view called Foo.</p>
  
  <p>xml/widget.xml:</p>
  
  <pre><code>&lt;appwidget-provider
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:minWidth="294dp"
   android:minHeight="72dp"
   android:updatePeriodMillis="0"
   android:initialLayout="@layout/widget_layout"&gt;
  &lt;/appwidget-provider&gt;
  </code></pre>
  
  <p>layout/widget_layout</p>
  
  <pre><code>&lt;LinearLayout
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"&gt;
   &lt;package.name.Foo
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Foo:</p>
  
  <pre><code>  public class Foo extends View 
    {..}
  </code></pre>
  
  <p>I tested the <code>Foo</code> view in a normal android app, and it works perfectly. However, when I try to run the widget I get <code>"error while loading widget"</code>. When I remove the <code>Foo</code> view from the widget, everything is fine. So it has something to do with the <code>Foo</code> view.</p>
  
  <p>Unfortunately I can't get any more specific errors in DDMS, cause I don't know of a way to debug widgets.</p>
  
  <p>I would like to know if it is indeed possible to use your own custom views in a app-widget?
  Am I doing something wrong here?</p>