package com.abbidot.tracker.widget;

import android.content.Context;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

/**
 * Created  by .yzq on 2026/4/10/周五.
 *
 * @link
 * @description:
 */
public class CustomLayoutManager extends LinearLayoutManager {

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

    @Override
    public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
        super.onLayoutChildren(recycler, state);

        // 根据需要修改布局和滚动效果
        // 例如调整位置或是控制滑出顶部的限制
    }

    @Override
    public boolean canScrollVertically() {
        return true;  // 允许垂直滚动
    }

    @Override
    public void scrollToPosition(int position) {
        // 自定义滚动位置，确保滑动时不会被提前阻止
        super.scrollToPosition(position);
    }
}

