I am quite new to animations and was trying to implement objectAnimator inside thread.The animation is to create a blinking effect (Like RippleEffect) which is in infinite loop.
private void hidePressedRing() {
pressedAnimator.setFloatValues(pressedRingWidth, 0f);
pressedAnimator.start();
}
private void showPressedRing() {
pressedAnimator.setFloatValues(animationProgress, pressedRingWidth);
pressedAnimator.start();
}
The below snippet is inside a thread handler() inside run() method.
if (pressed) {
showPressedRing();
pressed=false;
} else {
hidePressedRing();
pressed=true;
}
how should i implement blinking effect on a circle using objectAnimator in a loop;
Change below code according to your requirement...