package com.develop.food.base.widgets;

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

import androidx.recyclerview.widget.LinearLayoutManager;

public class ScrollLinearManager extends LinearLayoutManager {
    private boolean isCanVerticalScroll = true;

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

    public ScrollLinearManager(Context context, int orientation, boolean reverseLayout) {
        super(context, orientation, reverseLayout);
    }

    public ScrollLinearManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    @Override
    public boolean canScrollVertically() {
        return isCanVerticalScroll && super.canScrollVertically();
    }

    public void setCanScrollVertically(boolean isCanScroll) {
        isCanVerticalScroll = isCanScroll;
    }
}
