theme
fun theme(@ColorInt actionLight: Int? = null, @ColorInt actionDark: Int? = null, @ColorInt titleLight: Int? = null, @ColorInt titleDark: Int? = null)
Sets colors used throughout the SDK. If no color is provided the default Parakey colors will be used.
The SDK follows the system configuration for dark mode. If the app doesn't support dark mode it is recommended to force light mode by using AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
to keep the UI consistent.
Example
Parakey.theme(
actionLight = Color.CYAN,
titleLight = Color.MAGENTA,
)
Content copied to clipboard
Note: Can't be called before initialize.
Note: Make sure that there is enough contrast in both light and dark mode. Consider that green and red shades are used for success and failure states by the SDK.
Parameters
action Light
primary color in light mode used to highlight interactive components
action Dark
primary color in dark mode used to highlight interactive components
title Light
used for headings in light mode
title Dark
used for headings in dark mode