on-back-pressed.md 824 Bytes
Newer Older
MickeyMoz's avatar
MickeyMoz committed
1
2
3
4
[android-components](../../index.md) / [mozilla.components.feature.customtabs](../index.md) / [CustomTabsToolbarFeature](index.md) / [onBackPressed](./on-back-pressed.md)

# onBackPressed

MickeyMoz's avatar
MickeyMoz committed
5
`fun onBackPressed(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/customtabs/src/main/java/mozilla/components/feature/customtabs/CustomTabsToolbarFeature.kt#L244)
MickeyMoz's avatar
MickeyMoz committed
6
7
8
9
10
11
12

Overrides [UserInteractionHandler.onBackPressed](../../mozilla.components.support.base.feature/-user-interaction-handler/on-back-pressed.md)

When the back button is pressed if not initialized returns false,
when initialized removes the current Custom Tabs session and returns true.
Should be called when the back button is pressed.