Tencent / QMUI_Android

提高 Android UI 开发效率的 UI 库
http://qmuiteam.com/android
Other
14.46k stars 2.68k forks source link

Fragment滑动Crash #421

Open zxxcos opened 6 years ago

zxxcos commented 6 years ago

运行环境

具体问题描述

Lab—>QMUIFragment功能手动多滑几次,速度稍稍快一点,crash!

问题截图

Layout Inspector 文件(如何获取)

异常日志(堆栈)

Process: com.qmuiteam.qmuidemo, PID: 8171 java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. at android.view.ViewGroup.addViewInner(ViewGroup.java:4093) at android.view.ViewGroup.addView(ViewGroup.java:3943) at android.view.ViewGroup.addView(ViewGroup.java:3884) at com.qmuiteam.qmui.arch.QMUIFragment$2.onEdgeTouch(QMUIFragment.java:374) at com.qmuiteam.qmui.arch.SwipeBackLayout$ViewDragCallback.tryCaptureView(SwipeBackLayout.java:472) at android.support.v4.widget.ViewDragHelper.tryCaptureViewForDrag(ViewDragHelper.java:908) at android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:984) at com.qmuiteam.qmui.arch.SwipeBackLayout.onInterceptTouchEvent(SwipeBackLayout.java:362)

ghost commented 6 years ago

运行环境

具体问题描述

侧滑返回到一半 松手取消返回, 在侧滑在取消,反复操作多次 奇怪的是 demo 的程序 并没有发现有 crash

cgspine commented 6 years ago

现在可以升级到 0.2.0 了。 fix 了这个问题, 并且支持 activity 手势返回了。 不过现在需要在 Application.onCreate() 里调用 QMUISwipeBackActivityManager.init(this)