ViewAnimator icon indicating copy to clipboard operation
ViewAnimator copied to clipboard

Very important functionality Pause and Resume animation are missing.

Open ashishkumawat opened this issue 7 years ago • 2 comments

Please add pause and resume functions I customize library in my project to add functionality but ViewanimatorSet require api 19 for pause and resume. Hence please add your inbuilt functionality. My project supports minimum api 17.

ashishkumawat avatar Sep 19 '17 05:09 ashishkumawat

an you share the code to pause / resume please ? or make a pull request

florent37 avatar Sep 19 '17 06:09 florent37

I just simply called android inbuilt functions inside ViewAnimator class.

public ViewAnimator pause() {
        if (animatorSet != null){
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                animatorSet.pause();
            }
        }
        return this;
    }

    public ViewAnimator resume() {
        if (animatorSet != null){
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                animatorSet.resume();
            }
        }
        return this;
    }

ashishkumawat avatar Sep 19 '17 07:09 ashishkumawat