Closed 3llomi closed 2 weeks ago
For this, you can use ComplicationSlotsUserStyleSetting
:
This allows you to configure changes to the complications, such as positioning or visibility and should work for your use case.
I'm not sure if I can control visibility using ComplicationSlotsUserStyleSetting
.
Is there any sample for this?
You should be able to set enabled
accordingly : https://developer.android.com/reference/androidx/wear/watchface/style/UserStyleSetting.ComplicationSlotsUserStyleSetting.ComplicationSlotOverlay#ComplicationSlotOverlay(kotlin.Int,kotlin.Boolean,androidx.wear.watchface.complications.ComplicationSlotBounds,kotlin.Int,kotlin.Int,kotlin.Int)
Thanks! it worked.
Is there a way to enable/disable Watch Face complications based on a condition?
I'm working on a Watch Face where the user can customize it and I want to add the option for the user to enable or disable Complications.
Currently I have this code where I check if the complications are enabled, if so, then I can render (draw) complications, otherwise just don't render it.
Now this works, but the problem is that the watch face still detects the tap gesture on the complication itself even though the complication is not visible at all.