use of com.alexvasilkov.foldablelayout.shading.SimpleFoldShading in project FoldableLayout by alexvasilkov.
the class FoldableListLayout method init.
private void init(Context context) {
gestureDetector = new GestureDetector(context, new SimpleOnGestureListener() {
@Override
public boolean onDown(MotionEvent event) {
return FoldableListLayout.this.onDown();
}
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distX, float distY) {
return FoldableListLayout.this.onScroll(e1, e2);
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velX, float velY) {
return FoldableListLayout.this.onFling(velY);
}
});
gestureDetector.setIsLongpressEnabled(false);
animator = ObjectAnimator.ofFloat(this, "foldRotation", 0f);
minDistanceBeforeScroll = ViewConfiguration.get(context).getScaledTouchSlop();
flingAnimation = new FlingAnimation();
foldShading = new SimpleFoldShading();
setChildrenDrawingOrderEnabled(true);
}
Aggregations