3

I have successfully added snackbar to my application, but when I try to add a callback compiler fails to resolve setCallback() method. Is it a bug in AppCompat or I'm missing something?

Andrey Novikov
  • 5,563
  • 5
  • 30
  • 51

2 Answers2

4

This was fixed in v23 of Android Design Support Library.

Andrey Novikov
  • 5,563
  • 5
  • 30
  • 51
1

I just stumbled at the same problem and it really looks like Snackbar docs mention a callback that does not exist.

There are ways to implement most common tasks, though. More info in these threads:

How can I be notified when a Snackbar has dismissed itself?

Snackbar in Support Library doesn't include OnDismissListener()?

Ugly hacks, but for us devs it's bread and butter ;)

Community
  • 1
  • 1
Rafal Zawadzki
  • 963
  • 6
  • 15