Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Commit

Permalink
Generating and setting default layout parameters to pinnedView
Browse files Browse the repository at this point in the history
  • Loading branch information
beworker committed Nov 2, 2014
1 parent 414561f commit 2640017
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/src/com/hb/views/PinnedSectionListView.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ void createPinnedShadow(int position) {

// read layout parameters
LayoutParams layoutParams = (LayoutParams) pinnedView.getLayoutParams();
if (layoutParams == null) { // create default layout params
layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
if (layoutParams == null) {
layoutParams = (LayoutParams) generateDefaultLayoutParams();
pinnedView.setLayoutParams(layoutParams);
}

int heightMode = MeasureSpec.getMode(layoutParams.height);
Expand Down

0 comments on commit 2640017

Please sign in to comment.