# ConditionScopes.IfTrueScope

Artifact: [androidx.wear.protolayout:protolayout-expression](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/ConditionScopes.java+class:androidx.wear.protolayout.expression.ConditionScopes.IfTrueScope) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public class ConditionScopes.IfTrueScope<T extends DynamicBuilders.DynamicType, RawT>
```

<br />

*** ** * ** ***

Condition scope to allow binding the true value in a onConditional expression, yielding a resulting Dynamic value.`RawT` is the native Java type that can be used when constructing a constant T (e.g. String for DynamicString).

## Summary

| ### Public methods |
|---|---|
| `T` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/ConditionScopes.IfTrueScope#elseUse(T)(T valueWhenFalse)` Sets the value to use as the value when false in a conditional expression. |
| `T` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/ConditionScopes.IfTrueScope#elseUse(RawT)(RawT valueWhenFalse)` Sets the value to use as the value when false in a conditional expression. |

## Public methods

### elseUse

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public T elseUse(T valueWhenFalse)
```

Sets the value to use as the value when false in a conditional expression.

### elseUse

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public T elseUse(RawT valueWhenFalse)
```

Sets the value to use as the value when false in a conditional expression.