0

Quick question...

I'm currently using a library to "showcase" views in order to help a first-time user to my app to know how to perform certain functions. My problem is that the library I'm using, MaterialIntroView, doesn't appear to have any built-in method which I could create a sequence to show one "showcase" after another has finished.

I would like to be able to show another MaterialIntroView after the first has been dismissed by the user's click.

I tried using the library's provided .setListener(new MaterialIntroListener() method and simply inserted another MaterialIntroView.Builder within the onClick, but the second showcaseview won't show after the first is dismissed. Obviously not the right way to go about this...

Are there any kinds of built-in Android methods I could use to create some sort of Sequence that can run one batch of code after another is finished? Note that I do not want to have one show up after a certain amount of time - rather, I would like that the next view only shows after the first has been dismissed by the user's click.

Thanks so much for your help! Let me know if there's anything else I should add to clarify.

1 Answers1

0

You could check out how Long your Animation Needs and then integrate a simple timer that pausues the process before the next Animation starts.

try {
        Thread.sleep(milliseconds);
    } catch (Exception e) {

    }

where milliseconds is a placeholder for the time in milliseconds(MS) so if you put in 1000, the thread would wait for 1 second

  • Thanks for your response, ein siedler! I'll try out this method and see how it works. – ArclightOne Dec 22 '17 at 16:51
  • I guess my problem with `Thead.sleep` is that I can't seem to make it actually wait for the first showcaseview to finish showing before it runs. I tried putting that whole block into my `setListener` line within the other showcaseview's code, but it didn't ever show the next one - even with `Thread.sleep`. And if I try putting it outside of the first showcaseview's block of code, it just runs without waiting for the user's click in the first place. – ArclightOne Dec 22 '17 at 17:16
  • Well, it seems I figured it out. I goofed up and hadn't noticed that I had the same "UsageId" set for both the showcaseviews. Oops! Also, I had set it so the showcaseviews would only show once, and because they shared the same id, the second never had a chance to show until I changed the id for it! I just put the second showcaseview back into the `.setListener` section of the first's block of code and now it works. Thanks anyways for your help, ein siedler! – ArclightOne Dec 22 '17 at 18:04