LouisCAD / Splitties

A collection of hand-crafted extensions for your Kotlin projects.

Home Page:https://splitties.louiscad.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Snackbar not working"

oluwabajio opened this issue · comments

I added this to graddle
implementation("com.louiscad.splitties:splitties-snackbar:3.0.0-alpha06")

then calling snack("") doesnt work.

Try with some text instead of an empty string.

Checking your code, i can see its an extension function of CoordinatorLayout.

Why dont you make snackbar work without coordinatorLayout, as most people dont even use coordinatorLayout in their layouts.

Snackbar.make(binding.btnVerify,"Network Error!",Snackbar.LENGTH_LONG).show() for instance works fine by accepting the btnVerify view.

It's an extension of CoordinatorLayout because that's the only place where gestures are properly supported. That said, in dev version 3.0.0-dev-056, it's changed to View, so you can give it a try (see dev version setup instructions in README).

BTW, the Snackar is perfectly working as intended, but your code doesn't compile, which is not an issue. Please, be more specific in the issue title next time.