Chapter 2
Exploring Compound Controls
In Chapter 1, we said that one of the ways to customize views in Android is to compose (or put together) existing controls as a new compound control. In this chapter, we talk about how to create these custom compound controls.
There are a number of similarities between writing custom compound controls (the topic of this chapter) and directly customizing a standalone view (as what we did in Chapter 1). Managing custom attributes is identical in both types of customization. However, there are subtle but important differences in managing the view state of the custom compound control when compared to a custom view. Also, unlike custom views in which you do your own drawing, in the compound controls you don’t ...
Get Expert Android 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.