Skip to content

Snackbar

Non-Visible component
Category Requires Version
User Interface API 21, Android 5.0 Lollipop 4

Overview

A non-visible component that displays an alert at the bottom of the screen.

Events

Click

User clicked on the action button.

On Dismissed

Event to detect the snackbar was dismissed. Possible results can be: "UNDEFINED", "ACTION", "CONSECUTIVE", "MANUAL", "SWIPE" or "TIMEOUT". You can find more information at: https://developer.android.com/reference/android/support/design/widget/Snackbar.Callback.html

Params
event Text

On Shown

Event to detect the snackbar is shown.

Methods

Dismiss

Dismiss the snackbar.

Is Shown

Returns: Boolean

Returns true whether this snackbar is currently being shown.

Show

Show Snackbar (message supports HTML formatting)

Params
message Text

Show With Button

Show Snackbar with action button (message supports HTML formatting)

Params
message Text
button Text Text

Properties

Background Color

Color Default: #444444FF  ➖ Read Write - Designer Blocks

Specifies the snackbar's background color.

Button Text Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Specifies the action button's text color.

Duration

Number Default: 0 ➖ Write - Designer

Specifies the length of time that the Snackbar is shown

Text Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Property for TextColor


Last update: November 9, 2022