09-08-2020 23:54
09-08-2020 23:54
I have some settings for location of the activities counters and also the colour of them.
Since versa lite doesn't support elevation, I wanted to hide these options from the settings if the device is a versa lite, but can't see anyway in the docs to achieve this? Is this possible?
09-09-2020 00:01
09-09-2020 00:01
It's possible. Use React to conditionally display settings. See the hiddenToggle example here.
09-09-2020 00:16
09-09-2020 00:16
I want a colour picker though that can be hidden based on device.
So there are issues. The 1st is getting the device in the settings. The 2nd is hiding the colour picker
09-09-2020 00:25
09-09-2020 00:25
The recommended way of doing a device-specific conditional is to query the device capabilities using the Device API, communicate that to the companion API, set a setting for the capability in the companion API, then use that setting in the conditional expression in the settings JSX. Phew!
Unfortunately, that process tends to be slow and unreliable. A non-robust work-around is to cheat using info available here.