[android-components](../../index.md) / [mozilla.components.browser.menu.item](../index.md) / [BackPressMenuItem](index.md) / [setListener](./set-listener.md)

# setListener

`fun setListener(onClickListener: () -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/browser/menu/src/main/java/mozilla/components/browser/menu/item/BackPressMenuItem.kt#L42)

Sets and replaces the existing [backPressListener](#) for the back press item.

