Google is committed to advancing racial equity for Black communities. See how.

UserStyleRepository

class UserStyleRepository
kotlin.Any
   ↳ androidx.wear.watchface.style.UserStyleRepository

In memory storage for user style choices which allows listeners to be registered to observe style changes.

Summary

Nested classes
abstract

A listener for observing user style changes.

Public constructors

In memory storage for user style choices which allows listeners to be registered to observe style changes.

Public methods
Unit

Adds a UserStyleListener which is called immediately and whenever the style changes.

Unit

Removes a UserStyleListener previously added by addUserStyleListener.

Properties
UserStyleSchema

The UserStyleSchema for this UserStyleRepository which describes the available style categories.

UserStyle

The current user controlled style for rendering etc.

Public constructors

<init>

UserStyleRepository(schema: UserStyleSchema)

In memory storage for user style choices which allows listeners to be registered to observe style changes.

Public methods

addUserStyleListener

@UiThread fun addUserStyleListener(userStyleListener: UserStyleRepository.UserStyleListener): Unit

Adds a UserStyleListener which is called immediately and whenever the style changes.

removeUserStyleListener

@UiThread fun removeUserStyleListener(userStyleListener: UserStyleRepository.UserStyleListener): Unit

Removes a UserStyleListener previously added by addUserStyleListener.

Properties

schema

val schema: UserStyleSchema

The UserStyleSchema for this UserStyleRepository which describes the available style categories.

userStyle

var userStyle: UserStyle

The current user controlled style for rendering etc...