Turning a style into a theme

A theme is a style applied to an Activity or the whole application. To set a theme, use the android:theme attribute in the AndroidManifest.xml file. The theme attribute applies to the <Application> element as well as the <Activity> elements. All views within that element will be styled with the theme specified.

It's common to set the Application theme, but then override a specific Activity with a different theme.

In the previous recipe, we set the textViewStyle using the AppTheme style (which the wizard created automatically.) In this recipe, you will learn how to set both the Application and Activity themes.

Along with the style settings we have already explored, there are additional style options we didn't discuss because ...

Get Android Application Development Cookbook - 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.