Skip to content

Commit c912ef9

Browse files
author
teach
committed
处理ConsecutiveViewPager
1 parent cdded30 commit c912ef9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

consecutivescroller/src/main/java/com/donkingliang/consecutivescroller/ConsecutiveViewPager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public ConsecutiveViewPager(@NonNull Context context, @Nullable AttributeSet att
3131

3232
@Override
3333
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
34-
if (isAdjust() && mAdjustHeight > 0) {
34+
if (isConsecutiveParent() && mAdjustHeight > 0) {
3535
ConsecutiveScrollerLayout layout = (ConsecutiveScrollerLayout) getParent();
3636
int parentHeight = layout.getMeasuredHeight();
3737
int height = Math.min(parentHeight - mAdjustHeight, getDefaultSize(0, heightMeasureSpec));
@@ -42,7 +42,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
4242
}
4343
}
4444

45-
private boolean isAdjust() {
45+
private boolean isConsecutiveParent() {
4646
ViewParent parent = getParent();
4747
if (parent instanceof ConsecutiveScrollerLayout) {
4848
ConsecutiveScrollerLayout layout = (ConsecutiveScrollerLayout) parent;

0 commit comments

Comments
 (0)