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

Stopping the SlideShowView and playing it again after some changes crashes the library #10

Open
jmartinesp opened this issue Jun 2, 2014 · 0 comments
Labels

Comments

@jmartinesp
Copy link
Contributor

As I was doing some work on the demo, I found out that if you .stop() the SlideShowView and you .play() it again after changing its playlist with .setPlayList(), it will crash the library.

Logcat:

Process: com.marvinlabs.widget.slideshow.demo, PID: 31309
    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:3562)
            at android.view.ViewGroup.addView(ViewGroup.java:3415)
            at android.view.ViewGroup.addView(ViewGroup.java:3360)
            at android.view.ViewGroup.addView(ViewGroup.java:3336)
            at com.marvinlabs.widget.slideshow.SlideShowView.displayCurrentSlide(SlideShowView.java:444)
            at com.marvinlabs.widget.slideshow.SlideShowView.playCurrentSlide(SlideShowView.java:377)
            at com.marvinlabs.widget.slideshow.SlideShowView.next(SlideShowView.java:329)
            at com.marvinlabs.widget.slideshow.SlideShowView$3.run(SlideShowView.java:104)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5088)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
            at dalvik.system.NativeStart.main(Native Method)
@jmartinesp jmartinesp mentioned this issue Jun 2, 2014
@vpratfr vpratfr added the bug label Jun 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants