Skip to content

Commit

Permalink
Make sure sticky header martches parent in width
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Sjolander committed Jul 12, 2014
1 parent 4b2d121 commit 300e416
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ private void ensureHeaderHasCorrectLayoutParams(View header) {
if (lp == null) {
lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
header.setLayoutParams(lp);
} else if (lp.height == LayoutParams.MATCH_PARENT) {
} else if (lp.height == LayoutParams.MATCH_PARENT || lp.width == LayoutParams.WRAP_CONTENT) {
lp.height = LayoutParams.WRAP_CONTENT;
lp.width = LayoutParams.MATCH_PARENT;
header.setLayoutParams(lp);
}
}
Expand Down

0 comments on commit 300e416

Please sign in to comment.