title: Android: Widget Won't Show On Home Screen
body: <p>I have been following the App Widgets tutorial from the official Android Developer page:
  <a href="http://developer.android.com/guide/topics/appwidgets/index.html" rel="nofollow">http://developer.android.com/guide/topics/appwidgets/index.html</a></p>
  
  <p>I see the widget in 'Widgets', and when I go to add it to the main home screen, it loads the specified Activity, but the view does not display on the home screen.</p>
  
  <p>Here is the layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            android:background="@drawable/ic_launcher"&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal|center"
      android:text="My Widget..." /&gt;
  
  &lt;Button
      android:id="@+id/myButton"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal|center"
      android:text="My test button" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the app widget info:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
                  android:minWidth="72dp"
                  android:minHeight="72dp"
                  android:updatePeriodMillis="86400000"
                  android:previewImage="@drawable/ic_launcher"
                  android:initialLayout="@layout/widget_main"
                  android:configure=".MainActivity"
                  android:resizeMode="horizontal|vertical"
                  android:widgetCategory="home_screen|keyguard"
                  android:initialKeyguardLayout="@layout/widget_main"&gt;
  &lt;/appwidget-provider&gt;
  </code></pre>
  
  <p>And here is the receiver in the manifest:</p>
  
  <pre><code>&lt;receiver android:name="MyWidget" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.appwidget.action.APPWIDGET_UPDATE" /&gt;
              &lt;action android:name="android.appwidget.action.ACTION_WIDGET_RECEIVER"/&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data android:name="android.appwidget.provider"
                     android:resource="@xml/mywidget_info" /&gt;
      &lt;/receiver&gt;
  </code></pre>