Skip to content
Snippets Groups Projects
Commit 118c92b3 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Drop measure if MeasureSpec is incorrect

parent 68c1dd90
No related branches found
No related tags found
No related merge requests found
......@@ -82,11 +82,8 @@ public class FlingViewGroup extends ViewGroup {
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
if (widthMode != MeasureSpec.EXACTLY ) {
throw new IllegalStateException("can only be used in EXACTLY mode.");
}
if (MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.EXACTLY )
return;
final int count = getChildCount();
int maxHeight = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment