bgogetap / StickyHeaders

Easily add Sticky Headers to your RecyclerView
Apache License 2.0
521 stars 88 forks source link

allow ConstraintLayout parent view #93

Closed memorex386 closed 4 years ago

memorex386 commented 4 years ago

can you change the code to this to allow ConstraintLayout parent views?

static void validateParentView(View recyclerView) {
        View parentView = (View) recyclerView.getParent();
        if (!(parentView instanceof FrameLayout) && !(parentView instanceof CoordinatorLayout) && !(parentView instanceof ConstraintLayout)) {
            throw new IllegalArgumentException("RecyclerView parent must be either a FrameLayout, ConstraintLayout, or CoordinatorLayout");
        }
    }