android-components / mozilla.components.browser.toolbar / BrowserToolbar / Button

# Button

`class Button : ActionButton` (source)

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.

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

### Constructors

<init> | `Button(imageResource: Int, contentDescription: String, visible: () -> Boolean = { true }, background: Int? = null, listener: () -> Unit)` An action button to be added to the toolbar.

### Inherited Properties

visible | `open val visible: () -> Boolean` Lambda that returns true or false to indicate whether this button should be shown.

### Functions

createView | `open fun createView(parent: ViewGroup): View`

### Inherited Functions

bind | `open fun bind(view: View): Unit`