-
- All Implemented Interfaces:
-
android.view.animation.Animation.AnimationListener,com.jackpocket.scratchoff.paths.ScratchPathPointsAggregator
public class ScratchableLayoutDrawer implements ScratchPathPointsAggregator, Animation.AnimationListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceScratchableLayoutDrawer.Delegate
-
Field Summary
Fields Modifier and Type Field Description private InterpolatorclearAnimationInterpolatorprivate longclearAnimationDurationMsprivate booleanactivePathRecoveryEnabled
-
Constructor Summary
Constructors Constructor Description ScratchableLayoutDrawer(ScratchableLayoutDrawer.Delegate delegate)
-
Method Summary
Modifier and Type Method Description ScratchableLayoutDrawersetClearAnimationInterpolator(Interpolator clearAnimationInterpolator)ScratchableLayoutDrawersetClearAnimationDurationMs(long clearAnimationDurationMs)ScratchableLayoutDrawersetActivePathRecoveryEnabled(boolean activePathRecoveryEnabled)ScratchableLayoutDrawerattach(ScratchoffController controller, View scratchView, View behindView)ScratchableLayoutDrawerattach(int touchRadiusPx, View scratchView, View behindView)voidaddScratchPathPoints(Collection<ScratchPathPoint> events)voiddraw(Canvas canvas)voiddestroy()voidclear(boolean animationEnabled)voidonAnimationStart(Animation animation)voidonAnimationRepeat(Animation animation)voidonAnimationEnd(Animation animation)-
-
Constructor Detail
-
ScratchableLayoutDrawer
ScratchableLayoutDrawer(ScratchableLayoutDrawer.Delegate delegate)
-
-
Method Detail
-
setClearAnimationInterpolator
ScratchableLayoutDrawer setClearAnimationInterpolator(Interpolator clearAnimationInterpolator)
-
setClearAnimationDurationMs
ScratchableLayoutDrawer setClearAnimationDurationMs(long clearAnimationDurationMs)
-
setActivePathRecoveryEnabled
ScratchableLayoutDrawer setActivePathRecoveryEnabled(boolean activePathRecoveryEnabled)
-
attach
ScratchableLayoutDrawer attach(ScratchoffController controller, View scratchView, View behindView)
-
attach
ScratchableLayoutDrawer attach(int touchRadiusPx, View scratchView, View behindView)
-
addScratchPathPoints
void addScratchPathPoints(Collection<ScratchPathPoint> events)
-
destroy
void destroy()
-
clear
void clear(boolean animationEnabled)
-
onAnimationStart
void onAnimationStart(Animation animation)
-
onAnimationRepeat
void onAnimationRepeat(Animation animation)
-
onAnimationEnd
void onAnimationEnd(Animation animation)
-
-
-
-