Current Android Release version:
Version Code: Pie
Version: 9
API level: 28

Showing posts with label Android Material Design. Show all posts
Showing posts with label Android Material Design. Show all posts

Android: Snack Bar example

Google released Snackbar component in Android Design support library.

Snackbars are just like Toast messages except they provide action to interact with. Snackbar will be displayed at the bottom of the screen and they automatically time out after the given time length by animating off the screen. In addition, users can swipe them away before the timeout.

Android Design Support Library features

This library includes Navigation View, Floating Action Button (FAB), Text Input Layout, Snack Bar, Tab Layout.

The components are backwards compatible, with support back to Android 2.1 and implementing them is easier than previously.

To use this library, below declaration is needed application build.gradle file.

dependencies {
    compile "com.android.support:appcompat-v7:${supportLibVersion}"
    compile "com.android.support:design:${supportLibVersion}"
}