[android-components](../../../index.md) / [mozilla.components.concept.toolbar](../../index.md) / [Toolbar](../index.md) / [ActionToggleButton](index.md) / [toggle](./toggle.md)

# toggle

`fun toggle(notifyListener: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/concept/toolbar/src/main/java/mozilla/components/concept/toolbar/Toolbar.kt#L245)

Changes the selected state of the action to the inverse of its current state.

### Parameters

`notifyListener` - If true (default) the listener will be notified about the state change.