RecyclerViewNesting.java 824 字节
package com.hh.xuetubao.Utils;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;

public class RecyclerViewNesting extends RecyclerView {

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

    public RecyclerViewNesting(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public RecyclerViewNesting(Context context, AttributeSet attrs,
                               int defStyle) {
        super(context, attrs, defStyle);

    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
                MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}