Package com.pubmatic.sdk.common.view.cta
Class POBCTAOverlayAnimationHandler
-
- All Implemented Interfaces:
public final class POBCTAOverlayAnimationHandlerHandles 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
-
-
Constructor Summary
Constructors Constructor Description POBCTAOverlayAnimationHandler(View view)
-
Method Summary
Modifier and Type Method Description final UnitapplyDragAnimator(Integer bottomDismissThreshold, Function0<Unit> onViewDraggedBeyondParent)Sets the drag animator for the CTA overlay view. final UnitstartEntranceAnimation(Function0<Unit> onShow)Starts entrance animation for overlay Slide from bottom to top -
-
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
-
-
-
-