Define the App Widget Provider Info object in an XML resource using a single directory.
You can design your App Widget using the View objects listed below, but before you begin designing your App Widget, please read and understand the App Widget Design Guidelines.
Creating the App Widget layout is simple if you're familiar with Layouts.
Widgets should not generally extend to screen edges and should not visually be flush with other widgets, so you should add margins on all sides around your widget frame.
As of Android 4.0, app widgets are automatically given padding between the widget frame and the app widget's bounding box to provide better alignment with other widgets and icons on the user's home screen.
To take advantage of this strongly recommended behavior, set your application's target Sdk Version to 14 or greater.
It's easy to write a single layout that has custom margins applied for earlier versions of the platform, and has no extra margins for Android 4.0 and greater: class extends Broadcast Receiver as a convenience class to handle the App Widget broadcasts.
The App Widget Provider receives only the event broadcasts that are relevant to the App Widget, such as when the App Widget is updated, deleted, enabled, and disabled.
When these broadcast events occur, the App Widget Provider receives the following method calls: attribute in the App Widget Provider Info (see Adding the App Widget Provider Info Metadata above).This method is also called when the user adds the App Widget, so it should perform the essential setup, such as define event handlers for Views and start a temporary , if necessary.However, if you have declared a configuration Activity, this method is not called when the user adds the App Widget, but is called for the subsequent updates.App Widgets are miniature application views that can be embedded in other applications (such as the Home screen) and receive periodic updates.These views are referred to as Widgets in the user interface, and you can publish one with an App Widget provider.An application component that is able to hold other App Widgets is called an App Widget host. This document describes how to publish an App Widget using an App Widget provider.