page.title=Theme Editor parent.title=Tools parent.link=index.html page.tags=theme @jd:body
The Theme Editor is a visual assistant that helps you:
This page introduces the fundamental tasks that you can perform with the Theme Editor, and explains how to do so.
This section describes how to access the Theme Editor, and how it is laid out.
There are two ways to open the Theme Editor:
The Theme Editor's main screen is divided into two sections. The left side of the editor shows what specific UI elements, such as the app bar or a raised button, look like when you apply the current theme to them. The right side of the editor displays the settings for the color resources, such as Theme parent and colorPrimary, that comprise the current theme. You can modify design themes by changing these resource settings.
The Theme Editor allows you to create new themes, modify existing ones, and manage the colors that make up the themes.
To create a theme, follow these steps:
To rename a theme, perform the following steps:
To change an existing color resource, such as colorPrimary, follow these steps:
You can also directly select colors from the material palette, which the editor displays as two rows of colored squares beneath the color picker.
The Theme Editor allows you to preview colors associated with different states. To do so, open the Resource dialog, and click the State List tab that appears at the top of the dialog.
To more fully control the states themselves, you can directly view and edit their properties in the XML file, such as {@code colors.xml}, that defines them. For more information, see the documentation for the {@link android.content.res.ColorStateList} class.
You can choose device-specific configurations for your app to support. Perform the following steps to do so:
For more information about the relationship between directory names and configurations, see Supporting Multiple Screens. For more information about supported directory names, see Providing Resources.