wff-validator: `Variant` as a child element of `TimeText`
- Dominant language
- Kotlin
- Stars
- 71
- Forks
- 10
- Avg merge
- 4h 14m
- Merged PRs (30d)
- 1
Description
Hi,
I'm trying to change `TimeText` color in ambient mode, but I'm running into some issues with validator.
With the following xml everything passes:
```xml
```
adding `Variant` as a child of any `TimeText` in the following way gives an error:
```xml
```
```bash
INFO: WFF Validation Application Version unspecified. Maximum Supported Format Version #4
SEVERE: [Line 22:Column 80]: cvc-complex-type.2.4.d: Invalid content was found starting with element 'Variant'. No child element is expected at this point.
INFO: ❌ FAILED : /home/kamil/AndroidStudioProjects/WearWatchfaces/wff/jimball/src/main/res/raw/watchface.xml is NOT valid against watch face format version #1
```
It's worth mentioning that this specific watchface fails to change the color, but a `Variant` like:
```xml
```
placed in the same `TimeText` works just fine.
[`TimeText's` Docs](https://developer.android.com/reference/wear-os/wff/clock/time-text?version=1) specify following allowed inner elements:
> `Variant`
> Allows for changing attributes of this element when the Wear OS device is in ambient mode. More information is available in the [`Variant`](https://developer.android.com/training/wearables/wff/common/variant/variant) reference.
> `BitmapFont`
> A [BitmapFont](https://developer.android.com/training/wearables/wff/group/part/text/bitmap-font) to use for rendering the time.
> `Font`
> A [Font](https://developer.android.com/training/wearables/wff/group/part/text/font) to use for rendering the time.
So either I'm misunderstanding something or validator or docs are incorrect. It's quite possible I missed some details so if there's a reason for this behavior I'd be happy to learn it.
Contributor guide
Assessment
This issue has not been assessed yet.