Android SnackBar
SnackBar:
Snackbar is a UI element in android which is light and lets the users know about an operation that has just taken place.
Commonly used to Pop up brief message to the end user at the bottom of the desk top screen.
A snack bar is a type of message that the system displays to the user to indicate the success of an operation, a warning, or a command to perform an action.
Example:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SnackbarExample"
android:id="@+id/coordinatorlayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
>
<Button
android:id="@+id/snackbar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SHOW SNACKBAR"
android:textColor="@color/colorWhite"
android:background="@color/colorOrange"
android:padding="16dp"
/>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
Output