

A company might do this, for example, to use the company’s branding colors. Just as in a Java subclass, a style can override parent theme attributes with values customized for specific apps. This style also specifies a parent theme, which is similar to a superclass in Java-the new style inherits its parent theme’s attributes and their default values. The style.xml resource file contains a style with the name "AppTheme" that’s referenced from the app’s AndroidManifest.xml file to specify the app’s theme. You can customize aspects of the theme, such those that define an app’s color scheme, by defining style resources in the styles.xml file located in the in the app’s res/values folder.

The theme is specified in the app’s AndroidManifest.xml file (Section 3.7). Learn More Buy 3.5 Default Theme and Customizing Theme ColorsĮach app has a theme that defines the default look-and-feel of the standard views you use.

Android 6 for Programmers: An App-Driven Approach, 3rd Edition
