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
2 answers

Flutter: Modifying Scaffold to track currently displayed Scaffolds' BuildContexts for app-wide SnackBar methods

I am trying to track current Scaffolds (their BuildContexts) in order to create an app-wide SnackBar function. Currently I am creating a class which presents a Scaffold and adds its context to another class, which manages the currently running…
JVE999
  • 3,327
  • 10
  • 54
  • 89
0
votes
3 answers

SnackBar isn't displayed

I developed a routine for selecting and searching for items. Everything is working fine, but SnakBar is not displayed. I have no idea why. Can someone help me? This is the code with SnackBar: floatingActionButton: FloatingActionButton( …
0
votes
1 answer

Typescript 3.7.2, React and Material UI 4.5.1 Snackbars - trying to do an error popup but get styles errors

I am trying to use the material UI snackbar to show pop up errors in my react application. I am using a container view. In that view, it does some stuff and errors can be thrown. If it does get an error, I want to render my custom snackbar…
hellaeon
  • 33
  • 1
  • 8
0
votes
1 answer

Second Snackbar seems to trigger undo action of first if created too quickly

I have a RecyclerView and have an undo-functionality, where you delete an item but can press undo on the appearing Snackbar to insert the item back into the list. Now unfortunately, this happens: When deleting elements quickly in a row, some of…
Big_Chair
  • 2,781
  • 3
  • 31
  • 58
0
votes
1 answer

Show snackbar if email is validated with Javascript

I have a simple email form and I want to show a snackbar notification if the email address is validated. However, it seems the .test() method is not allowing the snackbar to display. When I run this, I see the "Showing snackbar" message in the…
adsigel
  • 111
  • 11
0
votes
1 answer

move tabs underneath snackbar when it pops up and move them back when it is gone in javascript

I wanted to know if there is a way to readjust tabs underneath a snackbar when it pops up at the top of the page? Like let's say tabs are at the very top of the page, snackbar with a height of 10px pops up at the top of the page then I want the…
mha
  • 551
  • 2
  • 11
  • 22
0
votes
6 answers

How to change the padding of the snackbar in flutter

How can I set spaces to snackbar from bottom and left/right sides?
katre
  • 173
  • 1
  • 5
  • 11
0
votes
1 answer

Flutter: How to "disable" touch while snackbar is showing

A RaisedButton will call a Snackbar and have setState(). However, the screen is tapable before Setstate change Below, is the part of code: child: RaisedButton( child: Text('Click Me'), onPressed: () { …
0
votes
2 answers

custom slide animation of snackbar

I made a snackbar on the top of my layout. BUT, when it appears, it slides upwards and when it is dismissed, it slides downwards. My wish is to make it appear from the top of the screen and slides down, and vice-versa. CoordinatorLayout…
Mihai Coman
  • 73
  • 1
  • 9
0
votes
0 answers

Swipe to dismiss changes position of arrow in bottomsheet

I have a Bottomsheet (with a recyclerview) with collapsed peekheight = 35 px where a small imageview is placed. After dismissing in the recyclerivew the position of this imageview is changed (from 42 px -> 80 px) and I didn't found the reason and…
0
votes
1 answer

Snackbar is not shown when internet connection is changed from ON to OFF

I used the NetInfo library to detect whether the internet connection is available. It is working perfectly , but the snackbar inside the NetInfo function is not shown when internet is changed from on to off. Snackbar is shown perfectly when started…
0
votes
1 answer

Snackbar is displayed after tapping back button

Flow is: user clicks on a link from screen 1 to go to screen 2. On screen 2, user enters required data and taps on save button that saves data and navigates to screen 1 where I want to show a snackbar. This sounds very similar to this and this…
Darshan
  • 10,550
  • 5
  • 49
  • 61
0
votes
2 answers

MaterialComponents Snackbar drawing below the status bar although I define correct margins on it

I am currently implementing the MaterialComponents Snackbar in my app and as I started using (WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS) the Snackbar started drawing behind the navigation bar. Usually this shouldn't be of a problem as I…
Made by FA
  • 710
  • 2
  • 7
  • 27
0
votes
1 answer

How to display Snackbar while selenium is running test?

I want to display snackbar while the selenium test is running. But as much as I know I need an html page so I can execute the javascript code for the snackbar and I running the test on a website that I cannot modify the code of it. I managed to…
assaf.gov
  • 517
  • 6
  • 19
0
votes
1 answer

Text truncates on custom snack bar on CoordinatorLayout

I’m trying to show a custom SnackBar inside of a CoordinatorLayout.. but the text inside is truncated and I’m not able to figure the reason for that.