Class POBCTAOverlayAnimationHandler

  • All Implemented Interfaces:

    
    public final class POBCTAOverlayAnimationHandler
    
                        

    Handles animations for the CTA overlay view, including:

    • Drag-to-dismiss with a rubber band effect for upward dragging

    • Entrance animation (slide in from bottom)

    • Snap-back animation on drag release

    • Dismissal when dragged beyond the parent boundary

    Since:

    4.9.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit applyDragAnimator(Integer bottomDismissThreshold, Function0<Unit> onViewDraggedBeyondParent) Sets the drag animator for the CTA overlay view.
      final Unit startEntranceAnimation(Function0<Unit> onShow) Starts entrance animation for overlay Slide from bottom to top
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • POBCTAOverlayAnimationHandler

        POBCTAOverlayAnimationHandler(View view)
        Parameters:
        view - The CTA overlay view to which animations are applied.
    • Method Detail

      • applyDragAnimator

         final Unit applyDragAnimator(Integer bottomDismissThreshold, Function0<Unit> onViewDraggedBeyondParent)

        Sets the drag animator for the CTA overlay view. This enables drag-to-dismiss functionality with a rubber band effect for upward dragging.

        Parameters:
        bottomDismissThreshold - indicates the bottom margin of the CTA Overlay view, if view goes beyond that onViewDraggedBeyondParent callback will be triggered.
        onViewDraggedBeyondParent - Optional callback triggered when the view is dragged beyond its parent boundary.
      • startEntranceAnimation

         final Unit startEntranceAnimation(Function0<Unit> onShow)

        Starts entrance animation for overlay Slide from bottom to top

        Parameters:
        onShow - Callback triggered when overlay is shown