Holder
Holder class for managing multiple SeslRecoilAnimator instances.
This class provides a convenient way to create, reuse, and manage recoil animations for different views. It helps optimize resource usage by reusing animators when possible.
Usage example:
Holder recoilHolder = new Holder(context);
view.setOnTouchListener((v, event) -> {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
recoilHolder.setPress(v);
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
recoilHolder.setRelease();
break;
}
return false; // Or true if the event is consumed
});
Content copied to clipboard
Functions
Link copied to clipboard
Removes all ValueAnimator.AnimatorUpdateListener objects from all SeslRecoilAnimator instances managed by this holder.
Link copied to clipboard
Initiates the release animation for all active recoil animators.