You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have started working on designing my first WearOS Watchface & I am using the sample project WatchFaceKotlin as a guide. Initially I found it quite confusing to follow how UserStyleSetting & ColorStyleIdAndResourceIds fits into the architecture, I think I am starting to understand it now.
BUT... If I want to give the User an option to [say] change just the color of the hands or edit some text on the watchface I am stuck on how I should go about this as ColorStyleIdAndResourceIds is an enum class with color presets, & therefore is immutable.
An Idea I had is to use the WatchFaceConfigStateHolder#setMinuteHandArmLength(newLengthRatio: Float) example & then apply any colors or strings changes afterward the preset style has been applied.
However, there is no option to set an Int or String & UserStyleSetting.CustomValueUserStyleSetting.CustomValueOption(customValue: ByteArray) seems overkill to store a ColorResource or Int (color value) or a String.
Even setMinuteHandArmLength is converting types: Float to a Double and storing using UserStyleSetting.DoubleRangeUserStyleSetting.DoubleRangeOption(value: Double)
@codingjeremy I can see from this PR that you designed this mechanism, can you offer some guidance?
Cheers
Mike
The text was updated successfully, but these errors were encountered:
I have started working on designing my first WearOS Watchface & I am using the sample project
WatchFaceKotlin
as a guide. Initially I found it quite confusing to follow howUserStyleSetting
&ColorStyleIdAndResourceIds
fits into the architecture, I think I am starting to understand it now.BUT... If I want to give the User an option to [say] change just the color of the hands or edit some text on the watchface I am stuck on how I should go about this as
ColorStyleIdAndResourceIds
is anenum
class with color presets, & therefore is immutable.An Idea I had is to use the
WatchFaceConfigStateHolder#setMinuteHandArmLength(newLengthRatio: Float)
example & then apply any colors or strings changes afterward the preset style has been applied.However, there is no option to set an
Int
orString
&UserStyleSetting.CustomValueUserStyleSetting.CustomValueOption(customValue: ByteArray)
seems overkill to store aColorResource
orInt
(color value) or aString
.setMinuteHandArmLength
is converting types:Float
to aDouble
and storing usingUserStyleSetting.DoubleRangeUserStyleSetting.DoubleRangeOption(value: Double)
@codingjeremy I can see from this PR that you designed this mechanism, can you offer some guidance?
Cheers
Mike
The text was updated successfully, but these errors were encountered: