Skip to content

Commit

Permalink
Fixed #128 - Behavior for which getStickySectionHeadersHolder() shoul…
Browse files Browse the repository at this point in the history
…d return a ViewGroup with LayoutParams coherent and initialized by the user who knows how these params has to be initialized. An exception will be raised if params are nulls.
  • Loading branch information
davideas committed Jun 29, 2016
1 parent dd83f11 commit 5c30974
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ private void initStickyHeadersHolder() {
//Initialize Holder Layout and show sticky header if exists already
mStickyHolderLayout = mAdapter.getStickySectionHeadersHolder();
if (mStickyHolderLayout != null) {
if (mStickyHolderLayout.getLayoutParams() == null) {
throw new IllegalStateException("The ViewGroup provided, doesn't have LayoutParams correctly set, please initialize the ViewGroup accordingly");
}
mStickyHolderLayout.setClipToPadding(false);
mStickyHolderLayout.setAlpha(0);
updateOrClearHeader(false);
Expand Down

0 comments on commit 5c30974

Please sign in to comment.