Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
wangweiqi23 committed May 22, 2018
1 parent 1e8a30e commit bba4d1e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ public void onClick(View v) {
mHeadsUpArrow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d(TAG, "ShopInfoDetail mHeadsUpArrow clicked mOffsetSpring:" +
mOffsetSpring + " mAppbarLayoutMaxOffset:" + mAppbarLayoutMaxOffset);
checkShouldSpringRecover(mParent, mAppBarLayout);
}
});
Expand Down Expand Up @@ -236,17 +234,13 @@ public boolean onInterceptTouchEvent(CoordinatorLayout parent, AppBarLayout chil
//滑动到最大状态后 屏蔽滑动事件
mIsBeingDragged = super.onInterceptTouchEvent(parent, child, ev) && mOffsetSpring !=
mAppbarLayoutMaxOffset;
Log.d(TAG, "touch onInterceptTouchEvent intercept:" + mIsBeingDragged + " action:" + ev
.getAction());
return false;
}

@Override
public boolean onTouchEvent(CoordinatorLayout parent, AppBarLayout child, MotionEvent ev) {
boolean touch = super.onTouchEvent(parent, child, ev) && mOffsetSpring !=
mAppbarLayoutMaxOffset;
Log.d(TAG, "touch onTouchEvent intercept:" + mIsBeingDragged + " action:" + ev
.getAction() + " touch:" + touch);
if (child != null) {
// float fixedBottom = getFixedBottom(child);
// if (fixedBottom <= mNormalViewHeight) {//滑动状态
Expand Down Expand Up @@ -297,10 +291,6 @@ public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, AppBarLayout
onHandleScroll(child, mNormalViewHeight + mOffsetSpring);
setTopAndBottomOffset((mOffsetSpring <= 0) ? mOffsetSpring : 0);
checkShouldSpring(coordinatorLayout, child, mOffsetSpring);
Log.e(TAG, "onNestedPreScroll 2 dy:" + dy + " childBottom " + child.getBottom() + " type:"
+ type + " consumed:" + Arrays.toString(consumed) + " mOffsetSpring:"
+ mOffsetSpring + " isBottom:" + (getFixedBottom(child) <= mNormalViewHeight)
+ " infoOffset:" + mShopInfoLayout.getCurrentOffset());
}

private void checkShouldSpring(CoordinatorLayout coordinatorLayout, AppBarLayout child, int
Expand Down Expand Up @@ -371,7 +361,6 @@ private void setTitleBarSearchProcess(float fixedBottom) {
mImageViewScaleHeight - mDpToPx50) {
alpha = (mImageViewScaleHeight - mDpToPx40 - fixedBottom) / mDpToPx10;
}
Log.d(TAG, "setTitleBarSearchProcess alpha:" + alpha);
if (mTitleSearchTextView != null) {
mTitleSearchTextView.setAlpha(getValidValue(alpha));
}
Expand All @@ -391,7 +380,6 @@ private void setSreachBtnAlphaProcess(float fixedBottom) {
mImageViewScaleHeight - mDpToPx40) {
alpha = (mDpToPx40 + fixedBottom - mImageViewScaleHeight) / mDpToPx20;
}
Log.d(TAG, "setShopImageAphlaProcess alpha:" + alpha);
if (mTitleSearchBtn != null) {
mTitleSearchBtn.setAlpha(getValidValue(alpha));
}
Expand Down Expand Up @@ -423,7 +411,6 @@ private float setShopImageScaleProcess(float fixedBottom) {
mImageViewScaleHeight - mDpToPx40) {
alpha = (mDpToPx40 + fixedBottom - mImageViewScaleHeight) / mDpToPx20;
}
Log.d(TAG, "setShopImageScaleProcess scale:" + scale + " alpha:" + alpha);
scale = getValidValue(scale);
alpha = getValidValue(alpha);
// 缩放目标View
Expand Down Expand Up @@ -454,8 +441,6 @@ private void setTitleBarBgProcess(float fixedBottom) {
} else {
alpha = 1;
}
Log.d(TAG, "temp setTitleBarBgProcess alpha:" + alpha + " frontHeight:"
+ mTitleBlurFrontLayout.getHeight());
if (mTitleBlurFrontLayout != null) {
mTitleBlurFrontLayout.setAlpha((int) (getValidValue(alpha) * 255));
}
Expand Down Expand Up @@ -512,10 +497,6 @@ private void onTitleLayoutTranslationY(int fixedBottom, float shopScaleY, float
titleBottomTranslationY = -mDpToPx40;
titleBottom = mTitleBarHeight;
}
Log.d(TAG, "temp onTitleLayoutTranslationY translationY:" + imageTranslationY + " " +
"shopScaleY:" + shopScaleY + " shopLikeScaleY:" + shopLikeScaleY + " LikeMarginH:"
+ mImageViewShopLike.getTranslationY() + " titleBottom:" + titleBottom +
" titleBottomTranslationY:" + titleBottomTranslationY);

if (mTitleBottomView != null) {
mTitleBottomView.setTranslationY(titleBottomTranslationY);
Expand Down Expand Up @@ -619,7 +600,6 @@ private void animateRecoverBySpring(final CoordinatorLayout coordinatorLayout, f
@Override
public void onAnimationUpdate(ValueAnimator animation) {
int value = (int) animation.getAnimatedValue();
Log.i(TAG, "animate animateRecoverBySpring animation:" + value);
if (updateSpringHeaderHeight(coordinatorLayout, abl, value)) {
mOffsetSpring = (value < 0) ? 0 : value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
* @return
*/
private boolean isInterceptNested(int dy, int x, int y) {
// Log.d(TAG, "NestedViewPager isInterceptNested miniTopHeight:" + mMiniTopHeight
// + " isScrollDown:" + (dy> 0) + " y:" + getY() + " !canScroll:"
// + !canScroll(this, false, dy, x, y) +" mCurItem:" + getCurrentItem()
// +" sIsMenuExpand:"+sIsMenuExpand);
if (dy < 0) {//上滑
return getY() > mMiniTopHeight;
} else {
Expand Down Expand Up @@ -222,9 +218,6 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
final int y = (int) ev.getY();
final int dy = y - mInitialMotionY;
final int yDiff = Math.abs(dy);
Log.v(TAG, "NestedViewPager onInterceptTouchEvent ACTION_MOVE " +
"Moved x to:" + x + "," + y + " diff=" + xDiff + "," + yDiff
+ " isIntercept:" + isInterceptNested(dy, x, y));
if (yDiff > mTouchSlop && yDiff * 0.5f > xDiff && isInterceptNested(dy, x, y)) {
// if (!mIsBeingDragged) {
//// mLastMotionY = y;
Expand Down Expand Up @@ -301,12 +294,6 @@ public boolean onTouchEvent(MotionEvent ev) {
mNestedYOffset += mScrollOffset[1];
}

Log.i(TAG, "=2= NestedViewPager onTouchEvent ACTION_MOVE " +
"mLastMotionY:" + mLastMotionY + " y:" + ev.getY() + " deltaY:" + deltaY
+ " mIsBeingDragged:" + mIsBeingDragged + " Y:" + getY()
+ " mScrollConsumed:" + Arrays.toString(mScrollConsumed)
+ " mScrollOffset:" + Arrays.toString(mScrollOffset)
+ " mNestedYOffset:" + mNestedYOffset);
if (mIsBeingDragged) {
mLastMotionY = y - mScrollOffset[1];

Expand Down

0 comments on commit bba4d1e

Please sign in to comment.