package com.cooleshow.student.widgets;

import android.graphics.Rect;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

/**
 * Author by pq, Date on 2021/3/18 0018.
 */
public class HomeHotMusicSheetItemDecoration extends RecyclerView.ItemDecoration {

    private int top;
    private int left;
    private int bottom;
    private int right;
    private int center;

    public HomeHotMusicSheetItemDecoration(int top, int left, int bottom, int right, int center) {
        this.top = top;
        this.left = left;
        this.bottom = bottom;
        this.right = right;
        this.center = center;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        //每行都只有2个
        outRect.top = top;
        outRect.bottom = bottom;
        outRect.right = right;
    }
}
