Reputation: 14409
I want to use the snackbar on the App I'm working on, but it will trow the following issue
android.view.InflateException: Binary XML file line #18: Error inflating class android.support.design.widget.Snackbar$SnackbarLayout
I read on this thread that it is because my activity is not extending from activities in the support library, and that is true. The thing is... I cannot change that (not my project, they dont want to use support library for some reason) Am I out of luck? Is there a "SnackBar" class that is not the supported one?
Upvotes: 0
Views: 428
Reputation: 345
If you don't want to use SnackBar because of Support Library, you can use Crouton ( https://github.com/keyboardsurfer/Crouton ). It's like SnackBar!
Upvotes: 0
Reputation: 156
I'm pretty sure that it is not possible to use snackbar without the support library. If you really can't use the support library then you should probably see if you can find an external library that has similar functionality to that of snackbar.
Why are you trying to use snackbar? Is there any reason that you can't use a toast instead? Take a look at this: Android - Snackbar vs Toast - usage and difference . It covers the differences between the two and explains when you should use one over the other.
Upvotes: 2