gowong / material-sheet-fab

Android library that provides the floating action button to sheet transition from Google's Material Design.
MIT License
1.58k stars 255 forks source link

Update MaterialSheetFab.java #13

Closed ialmetwally closed 9 years ago

ialmetwally commented 9 years ago

in some cases I need to do something after the sheet is hidden, like showing snackbar, so hideSheet(final AnimationListener endListener) should be public

gowong commented 9 years ago

Have you tried materialSheetFab.setEventListener? It accomplishes the same thing

ialmetwally commented 9 years ago

No EventListener is called before the animation ends, I want to show the SnackBar only after the animation ends completely.

I can use the EventListener if you put it after this:

if (endListener != null) {
    endListener.onEnd();
}
gowong commented 9 years ago

Ah I see what you mean now. I'll take a look at adding additional callbacks for when the animations end. In the meantime, if you need this urgently, you could create a subclass of MaterialSheetFab and provide a public method that calls hideSheet(final AnimationListener endListener)

ialmetwally commented 9 years ago

Sure thanks for the fast response :)

maybe you can add two more callbacks to the EventListener: onSheetHidden, onSheetShown