Watch Face Format version <button value="5" default="">Version 5</button> <button value="4">Version 4</button> <button value="3">Version 3</button> <button value="2">Version 2</button> <button value="1">Version 1</button>

*** ** * ** ***

A Boolean Configuration gives the user an option that can be turned on or off
when customizing the watch face in the watch face editor.

Introduced in Wear OS 4.

## Syntax

```xml
<BooleanConfiguration id="string" displayName="string" icon="string"
                         screenReaderText="string" defaultValue="TRUE | FALSE"
                         highlight="image resource"
/>
```

You can include a `BooleanConfiguration` element within a `Scene` element,
as shown in the following code snippet:

```xml
<UserConfigurations>
  <BooleanConfiguration id="show_date"
      displayName="show_date_label"
      screenReaderText="show_date_label"
      defaultValue="TRUE"
  />
</UserConfigurations>

<!-- ... -->

<Scene backgroundColor="#ff000000">
  <!-- ... -->

  <BooleanConfiguration id="show_date">
    <BooleanOption id="TRUE">
      <Group ...>
        <!-- ...Content to show date -->
      </Group>
    </BooleanOption>
    <BooleanOption id="FALSE">
      <Group ...>
        <!-- ...Content when date not required -->
      </Group>
    </BooleanOption>
  </BooleanConfiguration>

  <!-- ... -->
</Scene>
```

> [!NOTE]
> **Note:** `BooleanConfiguration` elements cannot be nested within a `Scene` when attempting to select content based on the value of two or more configuration options combined. For using configuration options in conjunction with other values, use [`Condition`](https://developer.android.com/training/wearables/wff/common/condition) instead. For example:  
>
> ```xml
> <Condition>
>   <Expressions>
>     <Expression name="show_date_and_time">
>       <![CDATA[[CONFIGURATION.show_date] == "TRUE" && [CONFIGURATION.show_time] == "TRUE"]]>
>     </Expression>
>   </Expressions>
>   ...
> </Condition>
> ```

## Attributes

The `BooleanConfiguration` element has the following attributes:

### Required attributes

The following attributes are required:

`id`
:   A unique identifier for the configuration value.

`displayName`
:   A resource ID corresponding to the text that is displayed in the watch
    face editor.

`defaultValue`
:   The default configuration value used if the user does not explicitly change
    the configuration in the watch face editor.

### Optional attributes

The following attributes are optional:

`icon`
:   A resource ID corresponding to the drawable resource which is shown in
    the watch face editor. This should have a maximum size of 400x400 px.

`screenReaderText`
:   A resource ID corresponding to the text which is used if the user has
    [TalkBack](https://support.google.com/wearos/answer/7313945) enabled.

`highlight`

:   An overlay image that helps to highlight the area of change for this
    configuration option on the watch face, which may be shown by editors that
    support it.

:   The image should have a transparent background, and be tintable. The aspect
    ratio of the image should match that of the watch face, and the image should
    also show the boundary of the area affected by the configuration change.

## Recommended for you

- Note: link text is displayed when JavaScript is off
- [BooleanConfiguration](https://developer.android.com/training/wearables/wff/v2/user-configuration/boolean-configuration)
- [Flavor](https://developer.android.com/training/wearables/wff/v2/user-configuration/flavor)
- [Flavor](https://developer.android.com/training/wearables/wff/user-configuration/flavor)