We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
侧滑返回功能,目前是滑动到屏幕一半宽度触发关闭。如果要改成其他距离呢? 我尝试在SwipeBackHelper中673行,修改逻辑 if (mShadowView.getWidth() + 2 * mShadowView.getTranslationX() >= 0)
也没什么效果,发现mShadowView.getTranslationX()要么为0,要么是 负的屏幕最大宽度 应该是在动画中已经决定了这个值。 然后在startSwipeAnimator中记录startValue值,再673行中与屏幕相比,是可以触发关闭,但是关闭的动画上存在问题。 期待回复~~
The text was updated successfully, but these errors were encountered:
@DaneChen 你好,抱歉我后来忘记回复你的提问。你提到mShadowView的值确实是在动画中就已经做了处理,参见DecelerateAnimator类中startAnimator方法,第207行mFinalValue = (finalValue * 2 < minFinalValue + maxFinalValue) ? minFinalValue : maxFinalValue;这里限定了动画结束的终值要么取最大要么取最小。
mFinalValue = (finalValue * 2 < minFinalValue + maxFinalValue) ? minFinalValue : maxFinalValue;
Sorry, something went wrong.
No branches or pull requests
侧滑返回功能,目前是滑动到屏幕一半宽度触发关闭。如果要改成其他距离呢?
我尝试在SwipeBackHelper中673行,修改逻辑
if (mShadowView.getWidth() + 2 * mShadowView.getTranslationX() >= 0)
也没什么效果,发现mShadowView.getTranslationX()要么为0,要么是 负的屏幕最大宽度
应该是在动画中已经决定了这个值。
然后在startSwipeAnimator中记录startValue值,再673行中与屏幕相比,是可以触发关闭,但是关闭的动画上存在问题。
期待回复~~
The text was updated successfully, but these errors were encountered: