Package org.robolectric.shadows
Class ShadowEdgeEffect
- java.lang.Object
-
- org.robolectric.shadows.ShadowEdgeEffect
-
@Implements(android.widget.EdgeEffect.class) public class ShadowEdgeEffect extends Object
Shadow forEdgeEffect
-
-
Constructor Summary
Constructors Constructor Description ShadowEdgeEffect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetCurrentEdgeEffectBehavior()Disable edge effects for Android S and above.
-
-
-
Method Detail
-
getCurrentEdgeEffectBehavior
@Implementation(minSdk=31) protected int getCurrentEdgeEffectBehavior()
Disable edge effects for Android S and above. The problem with edge effects in S+ is that ScrollView will intercept/swallow all touch events while edge effects are still running (inScrollView.onInterceptTouchEvent(MotionEvent).EdgeEffectcompletion depends on a free-running clock and draw traversals being continuously performed. So for Robolectric to ensure that edge effects are complete, it has to bump the uptime and then re-run draw traversals any time an edge effect starts.Because edge effects are not critical for unit testing, it is simpler to disable them.
-
-