7. Android Widgets

The Android home screen is more than just a collection of application launchers. It’s a user-configurable dashboard that contains a mix of quick-launch shortcuts and easily accessible information. Android apps can create mini applications called widgets, which contain a subset of the full functionality of an app. This chapter covers the basics of widgets. Along the way, you’ll learn that widgets can be embedded in any application, though they are typically embedded in the home screen; that RemoteViews allow apps to create a full layout hierarchy and send it to other processes that can inflate and display it; and that widgets can display dynamic collections of data from sources such as databases.

Creating a Basic Widget

An Android ...

Get Android UI Fundamentals: Develop and Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.