July 2015
Beginner to intermediate
600 pages
18h 59m
English
With the base theme squared away, it is time to customize the attributes of BeatBox’s AppTheme.
In the styles.xml file, define three attributes on your theme.
Listing 20.9 Setting theme attributes (res/values/styles.xml)
<resources>
<style name="AppTheme" parent="Theme.AppCompat">
<item name="colorPrimary">@color/red</item>
<item name="colorPrimaryDark">@color/dark_red</item>
<item name="colorAccent">@color/gray</item>
</style>
...
</resources>
Here, you define three theme attributes. These theme attributes look similar to the style attributes that you set up earlier, but they specify different properties. Style attributes specify properties for an individual widget, such as the textStyle that you used ...
Read now
Unlock full access