Skip to content
This repository was archived by the owner on Jul 11, 2024. It is now read-only.

Commit b8c13a7

Browse files
committed
Make fading-edge work
by overriding get*FadingEdgeStrength().
1 parent 30237de commit b8c13a7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

viewflow/src/org/taptwo/android/widget/ViewFlow.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,24 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
254254
}
255255
}
256256

257+
@Override protected float getTopFadingEdgeStrength() {
258+
return 0.0f;
259+
}
260+
261+
@Override protected float getBottomFadingEdgeStrength() {
262+
return 0.0f;
263+
}
264+
265+
@Override protected float getLeftFadingEdgeStrength() {
266+
// always do the fading edge
267+
return 1.0f;
268+
}
269+
270+
@Override protected float getRightFadingEdgeStrength() {
271+
// always do the fading edge
272+
return 1.0f;
273+
}
274+
257275
@Override
258276
public boolean onInterceptTouchEvent(MotionEvent ev) {
259277
if (getChildCount() == 0)

0 commit comments

Comments
 (0)