CitymapperSdkTheme

object CitymapperSdkTheme

Sets up the Citymapper theme in a context. Heavily based on MaterialThemeOverlay

Functions

Link copied to clipboard
fun obtainCitymapperThemeId(context: Context, attrs: AttributeSet?, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int, allowOverride: Boolean = true): Int

Retrieves the value of citymapperSdkTheme, taking into account defStyleAttr and defStyleRes allowing the Citymapper SDK theme to be set from default styles.

Link copied to clipboard
fun wrap(context: Context): Context

Returns a themed context. The theme in the passed context must already be a citymapper themed context, or have a citymapperSdkTheme attribute pointing to a theme

fun wrap(context: Context, attrs: AttributeSet?, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int): Context