MG Anim - mrkcsc/android-mg-bootstrap GitHub Wiki

MG Anim

A animation helper library that provides common animation patterns in a simple API (fades, springs, movements, etc).

Usage

  • Fade in/out views with a simple wrapper call - supports end states of View.VISIBLE,INVISIBLE and GONE. Returns an observable that emits an event when the animation completes.

// Basic fade in call.
MGAnimFade.setVisibility(someView, View.VISIBLE);

// Observe the fade completion callback.
MGAnimFade.setVisibility(fadeTestView, View.GONE)
        .takeUntil(getPaused())
        .observeOn(AndroidSchedulers.mainThread())
        .subscribe(o -> {
            
            // Do some action.
        });