Questions tagged [snackbar]

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

Introduction

Snackbars provide lightweight feedback about an operation. They show a brief message at the bottom of the screen on mobile and lower left on larger devices. Snackbars appear above all other elements on 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. Snackbars can be swiped off screen.

Snackbars can contain an action which is set via setAction(CharSequence, android.view.View.OnClickListener).

Documentation

Usage of SnackBar

493 questions
0
votes
1 answer

How to delay SnackBar in Flutter

How do I display a snackbar after a delay in Flutter? I tried Future.delayed(const Duration(milliseconds: 5000), () { ... } but it doesn't delay it at all.
MSpeed
  • 8,153
  • 7
  • 49
  • 61
0
votes
1 answer

Reactjs Redux Login/Registration Alerts

I was searching for a simple Login/Registration System and stumbled about this tutorial: http://jasonwatmore.com/post/2017/09/16/react-redux-user-registration-and-login-tutorial-example I tried it and added a real mongoDB Backend to remove the…
Martin Seubert
  • 978
  • 3
  • 21
  • 37
0
votes
2 answers

How do I manipulate the look of a mat-snack-bar template using CSS in Angular Material 7

I have seen answers that are a bit similar to what I am looking for but none of them addresses my specific issue conclusively. For example this answer shows you how to change the background color of the snack-bar and it works. The issue it seems…
YulePale
  • 6,688
  • 16
  • 46
  • 95
0
votes
1 answer

How to change an android theme programatically only to the snackbar?

I want to change the theme of the my custom snackbar public class CustomSnackbar extends BaseTransientBottomBar { public CustomSnackbar( CoordinatorLayout parent, View contentView, …
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
0
votes
0 answers

Angular Material Snackbar not opening when called inside of error handling method

I have service level error handling for my API requests. This works great except I want to be able to notify users that something went wrong on the UI other than just the console messages. I figured Material Snackbars would be great for this. After…
CAlex
  • 1,140
  • 2
  • 14
  • 28
0
votes
1 answer

SnackBar not showing when used inside HTTPInterceptor

I am trying to write a Global HTTP Interceptor which intercepts all HTTP Responses,inspects the responses and (if certain conditions are met), show a snackbar. I cant seem to get the snackbar to show. If I put a breakpoint at the .open() line, i see…
Sajjan Sarkar
  • 3,900
  • 5
  • 40
  • 51
0
votes
0 answers

Android - How do I keep a sticky snackbar when a new snackbar appears?

I have a sticky Snackbar (Snackbar.LENGTH_INDEFINITE). In some cases, there is another temporary Snackbar (either long or short) that should appear as well. The new temporary Snackbar automatically dismisses the sticky one. I would like to keep…
Tiferet Cohen
  • 283
  • 2
  • 7
0
votes
1 answer

Angular 6 MatSnackBar works in Chrome but not in IE11

Spent a few hours now trying to figure this out, MatSnackBar is working perfectly fine in Chrome but trhows a weird error in IE11. My setup: app.shared.module.ts: import { MatSnackBarModule} from '@angular/material'; my-test.component.ts: import {…
tom33pr
  • 853
  • 2
  • 12
  • 30
0
votes
1 answer

Express snackbar issue

trying to make my own snackbar and so far, it works great (kinda always has) only problem is, i've noticed using global or locals to set a variable that can be accessed on the client, is possible to catch if you are refreshing your site exactly the…
Christian
  • 39
  • 1
  • 8
0
votes
1 answer

How to display a specific view from the action of the Snackbar in IOS app in SWIFT3 XCODE 8.2

How can I display another view on my IOS app in SWift 3 from the action of Snackbar in IOS? I tried the following code(i.e As soon as the snackbar appear and I tap on the action part of the Snackbar then a new view of PatientViewController should…
0
votes
2 answers

Snackbar from custom class not showing

MyActivity coord.xml: id:coordID ... RVAdapter.java ... @Override public void onItemDismiss(int position) { ... notifyItemRemoved(position); LayoutInflater inflater =…
Nemanja
  • 211
  • 6
  • 16
0
votes
1 answer

Snackbar Error in activity => android.view.InflateException: can be used only with a valid ViewGroup root and attachToRoot=true

After updating the android studio to version 3.1.2 & gradle to version 4.4, I've faced weird problem to show snackbar in an activtiy. here is the code: @BindView(R.id.layout_coordinator) CoordinatorLayout coordinatorLayout; …
0
votes
2 answers

Material design snacbar not working in swift 4

as code given by materialdesign.io let action = MDCSnackbarMessageAction() let actionHandler = {() in let message = MDCSnackbarMessage() message.text = "Please complete your KYC detail" MDCSnackbarManager.show(message) } action.handler…
user9368327
0
votes
1 answer

Flutter: Snackbar does not show up after using barcode_scan plugin

In my Flutter app I want to scan some barcodes. After scanning the barcode I want to show a snackbar. The app should run on an Android device. Unfortunately the snackbar never shows up. Both functionalities (barcode scanning and showing the…
Moltie
  • 1
  • 3
0
votes
0 answers

How to use SnackBar in Fragment when checking Internet connectivity?

I have been building an online app and one of my main feature is to check whether it is connected to the Internet or not. I have decided to use a Snackbar to show this. But unfortunately, I have failed to do it. My app crashed upon running on my…
Matthew Miranda
  • 138
  • 1
  • 3
  • 15