Questions tagged [android-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

477 questions
0
votes
1 answer

com.rey.material.widget.SnackBar - The text into it appears on the top

When I show the snackbar the text appears on the top. I'm talking about the text, not the snackbar. The next picture shows this behaviour: I'm using the library of com.rey.material.widget (https://github.com/rey5137/Material/wiki/SnackBar), and…
Rafa0809
  • 1,733
  • 21
  • 24
0
votes
2 answers

Snackbar in a transparent activity

Was trying to make a snackbar in a transparent Activity and got errors, changed the theme in Manifest to android:theme="@style/Theme.AppCompat" now it works fine... Doesn't look good though. Is there a way to make the avtivity transparent and make…
Dunoo
  • 39
  • 10
0
votes
5 answers

Android : snackbar not working in fragment class

I want to use snackbar in my app so I set below code for that public class FragmentAddProperty extends Fragment { RelativeLayout mRelative public View onCreateView(LayoutInflater inflater, ViewGroup container, …
user3547706
  • 101
  • 1
  • 2
0
votes
1 answer

Android - Snackbar - Crashing with FATAL Exception after Show() is called

I have following code for displaying Snackbar in my App. #region Snackbar private const int SnackbarDuration = 1100; /// /// Shows a snackbar. Counts with the fact that there is a CoordinatorLayout with ID…
Jakub Holovsky
  • 6,543
  • 10
  • 54
  • 98
0
votes
1 answer

Using MrEngineer13's SnackBar library implementation

I am using @MrEngineer13's SnackBar implementation and was wondering how to capture 2 separate "ActionClick" events - depending on when the actionclick event occurs, I need to do different things. The builder looks like this - new…
0
votes
1 answer

Override design support library behaviour

I am trying to dismiss a Snackbar when a condition is satisfied. snackbar.setAction("Retry", new View.OnClickListener() { @Override public void onClick(View view) { if(isConnected(getApplicationContext())){ …
aselims
  • 1,843
  • 1
  • 17
  • 19
0
votes
2 answers

Snackbar does not show text

I'm using Google Design library (23.1.0) to show snackbars. My snackbar code lookls like: Snackbar snackbar = Snackbar.make(getView(), "Deleted",…
Praeterii
  • 340
  • 6
  • 16
0
votes
2 answers

Android snackbar

in my app i'm using a download DB sql lite and i have set this code to return a message for terminated download protected String doInBackground(String... params) { if(first) { File dbPath =…
DEV
  • 31
  • 1
  • 7
0
votes
1 answer

Android Sncabar Text not showing on Signed APK with proguard

Why Snacbar Text not showing on Signed APK? here is the code which working on debug APK. I enabled the proguard also. Does this happen because of the proguard ? if (intent.hasExtra(KEY_ERROR_MESSAGE)) { String msg =…
Chathura Wijesinghe
  • 3,310
  • 3
  • 25
  • 41
0
votes
3 answers

Snackbar in Preferences Activity

I'm trying to use snackbar with custom xml in my preferences activity. And i'm doing something wrong, because i get a nullpointer exception. I think it has something to do with the view, or maybe it`s because i don't use coordinator layout. Here is…
Gidi Sprintzin
  • 365
  • 1
  • 2
  • 15
0
votes
0 answers

Snackbar makes RecyclerView within CoordinatorLayout slide up when it shows

I'm testing the use of Snackbar for the first time and I'm finding a behaviour which I don't understand. My Activity is composed of a Fragment, which is composed of a FrameLayout with a RecyclerView. I'm using Toolbar and Appbar. When the Snackbar…
0
votes
0 answers

Snackbar in following activity

I have a MainActivity from which the user can enter an AddRecordActivity. Upon save, the user is returned to the MainActivity. Here I would like the user to see a snackbar confirming that the record has been saved (if it was saved properly) Two…
Poyan
  • 6,243
  • 6
  • 28
  • 30
0
votes
2 answers

Snackbar inside layout

Is it possible to show a Snackbar message inside a layout, like show it inside a RelativeLayout instead of show it at the bottom of the screen? I've tried to use a referenced view to a RelativeLayout but it doesn't…
Gnzlt
  • 4,383
  • 2
  • 22
  • 24
0
votes
1 answer

Snackbar doesn't show action the first time it pops up

Just as the title says. I implemented the Snackbar feature in my app, the first time the snackbar pops up it doesn't show the action, but on the second time it does. The code is below. IabHelper.OnIabPurchaseFinishedListener…
0
votes
2 answers

SnackBar covers FAB

My layout is absolutely identical with this tutorial. But in this tutorial we use app:layout_behavior="pl.michalz.hideonscrollexample.ScrollingFABBehavior" in Fab XML, so SnackBar covers the Fab. Without this code Fab does not move followed by…