Package-level declarations

Properties

Link copied to clipboard
const val OTHER_PALETTE_PAGE: Int = 1

The ThemePalettePicker page of the static palettes.

Link copied to clipboard

The ThemePalettePicker page of the wallpaper color variants.

Functions

Link copied to clipboard
fun dedupeStaticPaletteIds(options: List<String>, selectedPaletteId: String): List<String>

Returns a list of static palette IDs with duplicate palettes removed.

Link copied to clipboard
fun isAmoledAllowed(themeModeKey: String): Boolean

Returns whether the AMOLED toggle should be enabled for the selected theme mode.

Link copied to clipboard
fun ThemeModePicker(selectedMode: String, onSelected: (mode: String) -> Unit, modifier: Modifier = Modifier)

The theme mode choice: light, dark and follow system, each a card with a preview of the mode. The theme settings page and the onboarding theme page both show it. A stored mode that is neither light nor dark, including a blank one, selects follow system.

Link copied to clipboard
fun ThemePalettePager(pagerState: PagerState, pages: ImmutableList<@Composable () -> Unit>, modifier: Modifier = Modifier)

A horizontal pager used for theme palette selection.

Link copied to clipboard
fun ThemePalettePicker(preferences: ThemePreferencesState, seasonalThemesUnlocked: Boolean, onDynamicPaletteSelected: (variant: Int) -> Unit, onStaticPaletteSelected: (id: String, seasonal: Boolean) -> Unit, modifier: Modifier = Modifier, onPaletteTabSelected: (page: Int) -> Unit = {}, supportsDynamicColors: Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S, horizontalPadding: Dp = SizeConstants.LargeSize)

The color palette choice that the theme settings page and the onboarding theme page both show. With wallpaper colors (supportsDynamicColors, Android 12 and later) it is two tabs over a pager, the wallpaper color variants and the static palettes; without them, the static palettes alone.