O'Reilly logo

Android UI Design by Jessica Thornsby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Application widgets

Widgets provide users with a small, convenient sample of your application's most important data, typically from the comfort of their home screen.

To create a basic app widget, you need to complete the process described in the following sections.

Declaring an AppWidgetProvider class in your project's Manifest

The AppWidgetProvider class defines the methods that allow you to programmatically interact with your app widget based on broadcast events.

Here's an example of a basic AppWidgetProvider implementation:

<receiver android:name="MyAppWidgetProvider" > //Specifies the AppWidgetProvider that's used by this widget// <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> //The <action> element specifies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required