Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BGASwipeBackLayout中的mMoveState变量,导致关闭逻辑错误 #53

Closed
yangbo637829 opened this issue Aug 2, 2017 · 1 comment
Closed

Comments

@yangbo637829
Copy link

BGASwipeBackLayout中的onPanelDragged方法里面部分代码导致右滑一部分之后再左滑,页面还是关闭了。引起问题的代码:
float curOffsetDelta = mSlideOffset - lastSlideOffset; if (mMoveState == MOVE_STATE_RIGHT) { if (curOffsetDelta < mLastOffsetDelta) { curOffsetDelta = mLastOffsetDelta; mSlideOffset = lastSlideOffset + curOffsetDelta; mSlideOffset += 0.05f; if (mSlideOffset > 1.0f) { mSlideOffset = 1.0f; } } else { mLastOffsetDelta = curOffsetDelta; } }
我在本地尝试去掉mLastOffsetDelta和mMoveState相关的逻辑处理,发现没有出问题。所以请问下,这部分的逻辑是不是应该去掉会好些。

@bingoogolapple
Copy link
Owner

👌 下班回去搞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants