“colors.xml” a resource file in android which can let you define color resources so that you can use them in your application by their names.

If it is not visible in your project then create one under res/values/ folder.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="white" type="color">#FFFFFF</item>
    <item name="black" type="color">#000000</item>

    <!-- creating array of colors -->
    <integer-array name="androidcolors">
        <item>@color/white</item>
        <item>@color/black</item>
    </integer-array>

</resources>

 

Advertisements