Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Page 的子元素直接使用 Grid,滑动时报错 #52

Closed
DemoJameson opened this issue Mar 30, 2018 · 2 comments
Closed

Page 的子元素直接使用 Grid,滑动时报错 #52

DemoJameson opened this issue Mar 30, 2018 · 2 comments

Comments

@DemoJameson
Copy link
Contributor

DemoJameson commented Mar 30, 2018

目前为了正常使用,需要在 Grid 外面包一层 FrameLayout。

以下是报错内容:

java.lang.ClassCastException: com.tmall.wireless.vaf.virtualview.view.grid.GridImp cannot be cast to com.tmall.wireless.vaf.virtualview.container.Container
    at com.tmall.wireless.vaf.virtualview.view.page.PageView.removeData(PageView.java:526)
    at com.tmall.wireless.vaf.virtualview.view.page.PageView.remove(PageView.java:540)
    at com.tmall.wireless.vaf.virtualview.view.page.PageView.changeChildren(PageView.java:556)
    at com.tmall.wireless.vaf.virtualview.view.page.PageView.access$000(PageView.java:60)
    at com.tmall.wireless.vaf.virtualview.view.page.PageView$MyAnimatorListener.onAnimationEnd(PageView.java:623)
    at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1149)
    at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1309)
    at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
    at android.animation.AnimationHandler.-wrap2(AnimationHandler.java)
    at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:924)
    at android.view.Choreographer.doCallbacks(Choreographer.java:735)
    at android.view.Choreographer.doFrame(Choreographer.java:664)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:912)
    at android.os.Handler.handleCallback(Handler.java:761)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:156)
    at android.app.ActivityThread.main(ActivityThread.java:6523)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
@DemoJameson DemoJameson changed the title Page 的子元素直接使用 Grid 时,滑动时报错 Page 的子元素直接使用 Grid,滑动时报错 Mar 30, 2018
@longerian
Copy link
Contributor

grid不能写到根节点下,是需要包一层的。

@longerian
Copy link
Contributor

看错了,这是另外的问题,我修复下

longerian added a commit that referenced this issue Mar 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants