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 ...
Get Pro Android 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.