Skip to content

5. Queuing multiple FancyShowCaseView instances

Faruk Toptaş edited this page Oct 8, 2017 · 1 revision

Queuing

final FancyShowCaseView fancyShowCaseView1 = new FancyShowCaseView.Builder(this)
        .title("First Queue Item")
        .focusOn(mButton1)
        .build();

final FancyShowCaseView fancyShowCaseView2 = new FancyShowCaseView.Builder(this)
        .title("Second Queue Item")
        .focusOn(mButton2)
        .build();

final FancyShowCaseView fancyShowCaseView3 = new FancyShowCaseView.Builder(this)
        .title("Third Queue Item")
        .focusOn(mButton3)
        .build();

mQueue = new FancyShowCaseQueue()
        .add(fancyShowCaseView1)
        .add(fancyShowCaseView2)
        .add(fancyShowCaseView3);

mQueue.show();

Cancelling a queue

Cancels all further FancyShowCaseView instances. Boolean parameter hides the current shown FancyShowCaseView.

mQueue.cancel(true);

Complete listener for Queue

onComplete() method triggers after all queue items are shown.

mQueue.setCompleteListener(new OnCompleteListener() {
    @Override
    public void onComplete() {
        Log.v(TAG, "All FancyShowCaseView instances shown.");
    }
});