MrEngineer13 / SnackBar

toast-like alert pattern for Android inspired by the Google Material Design Spec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weird leftover after showing the snackbar twice

tasomaniac opened this issue · comments

In my second try of snackbar in an activity, it leaves a black leftover at the bottom left of the screen.

I have the same Issue...

The solution for me was to create getter in activity, and use SnackBar instance from activity

private SnackBar snackBar ;

...

    public SnackBar getSnackBar() {
        if(snackBar == null)
            snackBar = new SnackBar(this);

        return snackBar;
    }

When i created instance in OnCreate(), snackbar doesn't show at all

Sorry for my english...

It did not worked for me. It still gives me this weird black rectangular background when I initialize it once.

Same problem here

The snackbar should be created once, and then used via one of the show methods.

Even when I create it once and use the same object with show() methods, the problem still persists.

Can you post your code? This issue doesn't exist in the sample which displays multiple snacks via a single bar. Also are you using the lib from maven, or are you building from source?

I'm just going to bump this and ask for some relevant code to help with debugging

When I create it once and reuse it, it works just fine but when I create a second one it is screwed. Considering that this should not have to be a singleton in the activity this needs to be fixed.

If anything it's a documentation issue. However I have fixed this with #45

I am having the same issue, it doesn't seem to have been fixed. It's too bad, I really want to use this library.

I faced the same issue when instantiating the SnackBar from a fragment, problem solved when moved the SnackBar instance and its management to the FragmentActivity. I have a singleton SnackBar i call also.

This has been fixed in v0.4.1