Package com.unblu.sdk.core.ui
Class UnbluDefaultModalViewHandler
java.lang.Object
com.unblu.sdk.core.ui.UnbluDefaultModalViewHandler
- All Implemented Interfaces:
- UnbluModalViewHandler
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceCallback interface for indicating the end of an animation.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidfadeIn(android.view.View view, long duration, UnbluDefaultModalViewHandler.OnAnimationEndCallback callback) Animates the fade-in effect for a given view.static android.graphics.PointgetAppUsableScreenSize(android.content.Context context) Returns the usable screen size for the application.voidonDisposeModal(android.content.Context context) Disposes the current modal view.voidonExpandModal(android.content.Context context, UnbluAnimationData animSourceData, Function<UnbluDefaultModalViewHandler.OnAnimationEndCallback, Void> onAnimationEnd) Expands the modal view using the provided animation source data.voidonPresentAsModal(android.view.View unbluView, UnbluAnimationData animSourceData) Displays the provided view as a modal with animation and transformations.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.unblu.sdk.core.ui.UnbluModalViewHandlershouldPresentAsModal
- 
Constructor Details- 
UnbluDefaultModalViewHandlerpublic UnbluDefaultModalViewHandler()
 
- 
- 
Method Details- 
onPresentAsModal@NonNull public void onPresentAsModal(@NonNull android.view.View unbluView, @NonNull UnbluAnimationData animSourceData) Displays the provided view as a modal with animation and transformations.- Specified by:
- onPresentAsModalin interface- UnbluModalViewHandler
- Parameters:
- unbluView- the view to be displayed as a modal
- animSourceData- the animation source data for the transformation
 
- 
onDisposeModal@NonNull public void onDisposeModal(@NonNull android.content.Context context) Disposes the current modal view. We retrieve the latest unblu view drawingCache from the animSourceData and use it to animate the dismissal of the view.- Specified by:
- onDisposeModalin interface- UnbluModalViewHandler
- Parameters:
- context- the current active activity context, which allows to call the windowManager with the correct window token.
 
- 
getAppUsableScreenSizepublic static android.graphics.Point getAppUsableScreenSize(android.content.Context context) Returns the usable screen size for the application.- Parameters:
- context- the current application context
- Returns:
- a Point representing the usable screen size
 
- 
onExpandModalpublic void onExpandModal(@NonNull android.content.Context context, @NonNull UnbluAnimationData animSourceData, Function<UnbluDefaultModalViewHandler.OnAnimationEndCallback, Void> onAnimationEnd) Expands the modal view using the provided animation source data.- Parameters:
- context- the current application context
- animSourceData- the animation source data for the transformation
- onAnimationEnd- the function to be executed after the animation ends
 
- 
fadeInpublic static void fadeIn(android.view.View view, long duration, UnbluDefaultModalViewHandler.OnAnimationEndCallback callback) Animates the fade-in effect for a given view.- Parameters:
- view- the view to be faded in
- duration- the duration for the fade-in animation
- callback- the callback to be executed after the animation ends
 
 
-