From 2bd8ba080a0c26037665580443233010f85cf524 Mon Sep 17 00:00:00 2001 From: maoruibin <1252768410@qq.com> Date: Fri, 1 Apr 2016 15:24:44 +0800 Subject: [PATCH] Update PtrFrameLayout.java update variable name offsetX to offsetY --- ptr-lib/src/in/srain/cube/views/ptr/PtrFrameLayout.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ptr-lib/src/in/srain/cube/views/ptr/PtrFrameLayout.java b/ptr-lib/src/in/srain/cube/views/ptr/PtrFrameLayout.java index 93e761c..9659714 100755 --- a/ptr-lib/src/in/srain/cube/views/ptr/PtrFrameLayout.java +++ b/ptr-lib/src/in/srain/cube/views/ptr/PtrFrameLayout.java @@ -230,14 +230,14 @@ protected void onLayout(boolean flag, int i, int j, int k, int l) { } private void layoutChildren() { - int offsetX = mPtrIndicator.getCurrentPosY(); + int offsetY = mPtrIndicator.getCurrentPosY(); int paddingLeft = getPaddingLeft(); int paddingTop = getPaddingTop(); if (mHeaderView != null) { MarginLayoutParams lp = (MarginLayoutParams) mHeaderView.getLayoutParams(); final int left = paddingLeft + lp.leftMargin; - final int top = paddingTop + lp.topMargin + offsetX - mHeaderHeight; + final int top = paddingTop + lp.topMargin + offsetY - mHeaderHeight; final int right = left + mHeaderView.getMeasuredWidth(); final int bottom = top + mHeaderView.getMeasuredHeight(); mHeaderView.layout(left, top, right, bottom); @@ -247,11 +247,11 @@ private void layoutChildren() { } if (mContent != null) { if (isPinContent()) { - offsetX = 0; + offsetY = 0; } MarginLayoutParams lp = (MarginLayoutParams) mContent.getLayoutParams(); final int left = paddingLeft + lp.leftMargin; - final int top = paddingTop + lp.topMargin + offsetX; + final int top = paddingTop + lp.topMargin + offsetY; final int right = left + mContent.getMeasuredWidth(); final int bottom = top + mContent.getMeasuredHeight(); if (DEBUG && DEBUG_LAYOUT) {