当前位置:网站首页>Live online system source code, using valueanimator to achieve view zoom in and out animation effect

Live online system source code, using valueanimator to achieve view zoom in and out animation effect

2022-07-07 07:41:00 Cloudleopard network technology

Online live broadcast system source code , Use ValueAnimator Realization view Zoom in and out animation effect

ValueAnimator valueAnimator = ObjectAnimator.ofFloat(1f, 0.8f);
valueAnimator.addUpdateListener(valueAnimator1 -> {
    
    valueAnimator1.setDuration(300);
    valueAnimator1.setRepeatCount(INFINITE);
    valueAnimator.setRepeatMode(ValueAnimator.REVERSE);
    if (valueAnimator1.getAnimatedValue() instanceof Float && constraintLayout != null) {
    
        constraintLayout.setScaleX((Float) valueAnimator1.getAnimatedValue());
        constraintLayout.setScaleY((Float) valueAnimator1.getAnimatedValue());
    }
});
valueAnimator.start();

That's all Online live broadcast system source code , Use ValueAnimator Realization view Zoom in and out animation effect , More content welcome to follow the article

原网站

版权声明
本文为[Cloudleopard network technology]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070348596884.html