package com.seatel.mobilehall.util.customview;

import android.content.Context;
import android.util.AttributeSet;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;


public class CustomRecyclerView extends RecyclerView {

    private final float FLING_SCALE_DOWN_FACTOR = 0.8f;

    public CustomRecyclerView(Context context) {
        super(context);
    }

    public CustomRecyclerView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public CustomRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public boolean fling(int velocityX, int velocityY) {

        velocityY *= FLING_SCALE_DOWN_FACTOR;

        return super.fling(velocityX, velocityY);
    }
}
