Posts

Showing posts with the label Snackbar

Can We Perform 2 Different Actions In Snack Bar At A Time In Android?

Answer : From the Google design specifications: Each snackbar may contain a single action, neither of which may be “Dismiss” or “Cancel.” For multiple actions, use a dialog. As @Elias N answer's each Snackbar may contain a single action. If you want to set more then action in Snackbar then you need to create your own layout. Please try this i hope this will help you. Create one xml file my_snackbar.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="50dp" android:background="#000000"> <TextView android:layout_width="0dp" android:layout_height="50dp" android:layout_weight=".7" android:gravity="center_ver...