package com.evsuite.abrp; /** * The app's colours while an Overview style shows its own palette: the theme overlay * (res/values/style_palettes.xml) that MainActivity lays over the accent colour, so the * navigation and the rest of the app match the style — Retro's turquoise, Terminal's green * phosphor, and so on. Styles drawn in the accent colour have none. */ final class StylePalette { private StylePalette() {} /** The overlay for a style's own palette, or 0 for a style that has none. */ static int overlay(OverviewStyle style) { switch (style) { case RETRO: return R.style.ThemeOverlay_EV_Style_Retro; case TERMINAL: return R.style.ThemeOverlay_EV_Style_Terminal; case SCIFI: return R.style.ThemeOverlay_EV_Style_SciFi; case CARTOON: return R.style.ThemeOverlay_EV_Style_Cartoon; case NIXIE: return R.style.ThemeOverlay_EV_Style_Nixie; case GRID: return R.style.ThemeOverlay_EV_Style_Grid; case TIME_CIRCUITS: return R.style.ThemeOverlay_EV_Style_TimeCircuits; case QUEST: return R.style.ThemeOverlay_EV_Style_Quest; default: return 0; } } /** The overlay the app wears: the style's own when it shows its palette, else the accent's. */ static int appOverlay(OverviewStyle style, boolean originalChosen, AccentColor accent) { int own = overlay(style); return own != 0 && style.showsOwnPalette(originalChosen) ? own : accent.overlay; } }