O'Reilly logo

Mastering Android Studio 3 by Kyle Mew

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

The palette library

Applying our own themes to our apps can produce very stylish-looking interfaces, especially when we are dealing with text, icons, and images we created ourselves to suit the app. Many apps incorporate the user's own images and, in these cases, there is no way of knowing in advance how to select a pleasing design. The palette support library provides us with this functionality, allowing fine control over text, icon, and background coloring.

The following steps demonstrate how to extract the prominent colors from a bitmap drawable:

  1. Start a new Android Studio project and open the Project Structure dialog from the File menu or Ctrl + Alt + Shift + S.
  2. Open the Dependency tab from your app Module and add a Library dependency ...

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