public final class UserStyle

An immutable representation of user style choices that maps each UserStyleSetting to UserStyleSetting.Option.

This is intended for use by the WatchFace and entries are the same as the ones specified in the UserStyleSchema. This means you can't serialize a UserStyle directly, instead you need to use a UserStyleData (see toUserStyleData).

To modify the user style, you should call toMutableUserStyle and construct a new UserStyle instance with MutableUserStyle.toUserStyle.


Public constructors

UserStyle(UserStyle userStyle)

Constructs a copy of the UserStyle.

Constructs a UserStyle with the given selected options for each setting.

UserStyle(UserStyleData userStyle, UserStyleSchema styleSchema)

Constructs a UserStyle from a UserStyleData and the UserStyleSchema.

Public methods

equals(Object other)

Returns the UserStyleSetting.Option for key if there is one or null otherwise.

final UserStyleSetting.Option