android-components / mozilla.components.concept.toolbar / Toolbar / ActionButton / <init>

# <init>

`ActionButton(@DrawableRes imageResource: Int, contentDescription: String, visible: () -> Boolean = { true }, @DrawableRes background: Int? = null, padding: Padding? = null, listener: () -> Unit)`

An action button to be added to the toolbar.

### Parameters

`imageResource` - The drawable to be shown.

`contentDescription` - The content description to use.

`visible` - Lambda that returns true or false to indicate whether this button should be shown.

`background` - A custom (stateful) background drawable resource to be used.

`padding` - A optional custom padding.

`listener` - Callback that will be invoked whenever the button is pressed