Color Resources

Begin by defining a few colors that you will use throughout this chapter. Edit your res/values/colors.xml file to match Listing 21.1.

Listing 21.1  Defining a few colors (res/values/colors.xml)

<resources>
    <color name="colorPrimary">#008577</color>
    <color name="colorPrimaryDark">#00574B</color>
    <color name="colorAccent">#D81B60</color>

    <color name="red">#F44336</color>
    <color name="dark_red">#C3352B</color>
    <color name="gray">#607D8B</color>
    <color name="soothing_blue">#0083BF</color>
    <color name="dark_blue">#005A8A</color>
</resources>

Color resources are a convenient way to specify color values in one place that you reference throughout your application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.5.68