8.3.4. Defining Styles and Applying Them to GUI Components

You can define common GUI component attribute–value pairs as style resources (Section 8.4.4). You can then apply the styles to all components that share those values (Section 8.4.7) by using the style attribute. Any subsequent changes you make to a style are automatically applied to all GUI components that use the style. We use this to style the TextViews that display a contact’s information.

Get Android™ How to Program, Second Edition 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.