Skip to content

Commit 214025a

Browse files
authored
Merge pull request umano#722 from BrianOn99/fix-android-N-bug
Fix umano#623, a crash on Android N
2 parents 384fefd + b78435d commit 214025a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/main/java/com/sothree/slidinguppanel/SlidingUpPanelLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,9 +719,9 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
719719
final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
720720
final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
721721

722-
if (widthMode != MeasureSpec.EXACTLY) {
722+
if (widthMode != MeasureSpec.EXACTLY && widthMode != MeasureSpec.AT_MOST) {
723723
throw new IllegalStateException("Width must have an exact value or MATCH_PARENT");
724-
} else if (heightMode != MeasureSpec.EXACTLY) {
724+
} else if (heightMode != MeasureSpec.EXACTLY && heightMode != MeasureSpec.AT_MOST) {
725725
throw new IllegalStateException("Height must have an exact value or MATCH_PARENT");
726726
}
727727

0 commit comments

Comments
 (0)