Snackbar

suggest change

Versions

[{“Name”:“3.0.x”,“GroupName”:null},{“Name”:“3.1.x”,“GroupName”:null},{“Name”:“3.2.x”,“GroupName”:null},{“Name”:“4.0”,“GroupName”:null},{“Name”:“4.0.3”,“GroupName”:null},{“Name”:“4.1”,“GroupName”:null},{“Name”:“4.2”,“GroupName”:null},{“Name”:“4.3”,“GroupName”:null},{“Name”:“4.4”,“GroupName”:null},{“Name”:“4.4W”,“GroupName”:null},{“Name”:“5.0”,“GroupName”:null},{“Name”:“5.1”,“GroupName”:null},{“Name”:“6.0”,“GroupName”:null},{“Name”:“7.0”,“GroupName”:null},{“Name”:“7.1”,“GroupName”:null}]

Syntax

Parameters

Parameter | Description | —— | —— | view | View: The view to find a parent from. | text | CharSequence: The text to show. Can be formatted text. | resId | int: The resource id of the string resource to use. Can be formatted text. | duration | int: How long to display the message. This can be LENGTH_SHORT, LENGTH_LONG or LENGTH_INDEFINITE |

Remarks

Snackbar provides lightweight feedback about an operation. It displays a brief message at the bottom of the screen on mobile and at the bottom left on larger devices. Snackbars appear above all other elements on the screen and only one can be displayed at a time.

They automatically disappear after a timeout or after user interaction elsewhere on the screen, particularly after interactions that summon a new surface or activity. Snackbar can be swiped off screen.

Before using SnackBar you must add the design support library dependency in the build.gradle file:

dependencies {
    compile 'com.android.support:design:25.3.1'
}

Official Documentation

https://developer.android.com/reference/android/support/design/widget/Snackbar.html

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents