O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

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

Working with Lists in Remote Views

In Chapter 25, we covered the existing set of classes in the SDK that support home screen widgets. The primary ones are AppWidgetProvider, AppWidgetManager, RemoteViews, and an activity that can be used to configure an AppWidgetProvider with initialization parameters.

Briefly, here is the core idea of how home screen widgets work (knowing this should make the rest of this section a bit easier to follow). An AppWidgetProvider is a broadcast receiver that gets invoked every once in a while based on a timer interval that you specify in a configuration file. This AppWidgetProvider then loads a RemoteViews instance based on a layout file. This RemoteViews object is then passed to the AppWidgetManager to be displayed ...

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