O'Reilly logo

Mastering Android Development with Kotlin by Miloš Vasić

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styles in Android

The theme we just defined represents style. All styles are defined in the styles.xml file. We will create several styles to demonstrate how easy it is for you to create styles and how powerful they are. You can define styles for buttons, text, or any other view. You can inherit styles too.

For the purpose of styling, we will define the color palette that we will use in the application. Open your colors.xml file and extend it as follows:

 <color name="green">#11c403</color> <color name="green_dark">#0e8c05</color> <color name="white">#ffffff</color> <color name="white_transparent_40">#64ffffff</color> <color name="black">#000000</color> <color name="black_transparent_40">#64000000</color> <color name="grey_disabled">#d5d5d5</color> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required