Skip to content

Commit

Permalink
fixed measurement of root with wrap content height
Browse files Browse the repository at this point in the history
  • Loading branch information
emilsjolander committed Dec 29, 2013
1 parent 3081f6c commit f06e41b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package com.etsy.android.grid;

import java.util.Arrays;

import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcel;
Expand All @@ -28,6 +26,8 @@
import android.view.View;
import android.view.ViewGroup;

import java.util.Arrays;

/**
* A staggered grid view which supports multiple columns with rows of varying sizes.
* <p/>
Expand Down Expand Up @@ -264,7 +264,7 @@ protected void onMeasureChild(final View child, final LayoutParams layoutParams)
childHeightSpec = MeasureSpec.makeMeasureSpec(layoutParams.height, MeasureSpec.EXACTLY);
}
else {
childHeightSpec = MeasureSpec.makeMeasureSpec(LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY);
childHeightSpec = MeasureSpec.makeMeasureSpec(LayoutParams.WRAP_CONTENT, MeasureSpec.UNSPECIFIED);
}
child.measure(childWidthSpec, childHeightSpec);
}
Expand Down

0 comments on commit f06e41b

Please sign in to comment.