In the preceding chapters, we have seen how to set styles for components. In an application with a large number of UI components, setting attributes for each can be a tedious task and can also lead to errors. A Theme allows us to set the style attributes for an entire class of components in a single place. This not only simplifies the task of setting attributes for all components of a particular type but also ensures that any newly added component will look just like all the others of the same type in the application. A theme thereby establishes a visual coherence through all the screens of an application.
In this chapter, we shall study themes and their usage in detail through the following steps: