Search in sources :

Example 1 with Sequence

use of tourguide.tourguide.Sequence in project TourGuide by worker8.

the class OverlaySequenceTourActivity method runOverlayListener_ContinueMethod.

private void runOverlayListener_ContinueMethod() {
    // the return handler is used to manipulate the cleanup of all the tutorial elements
    ChainTourGuide tourGuide1 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("ContinueMethod.OVERLAY_LISTENER").setDescription("When using OVERLAY_LISTENER, you can add more actions before proceeding to next TourGuide, such as showing a Toast message.").setGravity(Gravity.BOTTOM)).playLater(mButton1);
    ChainTourGuide tourGuide2 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Tip").setDescription("Individual Overlay will be used when it's supplied.").setBackgroundColor(Color.parseColor("#c0392b")).setGravity(Gravity.BOTTOM | Gravity.LEFT)).setOverlay(new Overlay().setEnterAnimation(mEnterAnimation).setExitAnimation(mExitAnimation).setBackgroundColor(Color.parseColor("#EE2c3e50")).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            mTourGuideHandler.next();
        }
    })).playLater(mButton2);
    ChainTourGuide tourGuide3 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("ContinueMethod.OVERLAY_LISTENER").setDescription("When using this ContinueMethod, you need to call tourGuide.next() explicitly.").setGravity(Gravity.TOP)).playLater(mButton3);
    Sequence sequence = new Sequence.SequenceBuilder().add(tourGuide1, tourGuide2, tourGuide3).setDefaultOverlay(new Overlay().setEnterAnimation(mEnterAnimation).setExitAnimation(mExitAnimation).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(OverlaySequenceTourActivity.this, "default Overlay clicked", Toast.LENGTH_SHORT).show();
            mTourGuideHandler.next();
        }
    })).setDefaultPointer(null).setContinueMethod(Sequence.ContinueMethod.OVERLAY_LISTENER).build();
    mTourGuideHandler = ChainTourGuide.init(this).playInSequence(sequence);
}
Also used : ToolTip(tourguide.tourguide.ToolTip) ChainTourGuide(tourguide.tourguide.ChainTourGuide) Sequence(tourguide.tourguide.Sequence) Overlay(tourguide.tourguide.Overlay) View(android.view.View)

Example 2 with Sequence

use of tourguide.tourguide.Sequence in project TourGuide by worker8.

the class OverlaySequenceTourActivity method runOverlay_ContinueMethod.

private void runOverlay_ContinueMethod() {
    // the return handler is used to manipulate the cleanup of all the tutorial elements
    ChainTourGuide tourGuide1 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("ContinueMethod.OVERLAY").setDescription("When using this ContinueMethod, you can't specify the additional action before going to next TourGuide.").setGravity(Gravity.BOTTOM)).playLater(mButton1);
    ChainTourGuide tourGuide2 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Tip").setDescription("Individual Overlay will be used when it's supplied.").setGravity(Gravity.BOTTOM | Gravity.LEFT).setBackgroundColor(Color.parseColor("#c0392b"))).setOverlay(new Overlay().setBackgroundColor(Color.parseColor("#EE2c3e50")).setEnterAnimation(mEnterAnimation).setExitAnimation(mExitAnimation)).playLater(mButton2);
    ChainTourGuide tourGuide3 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("ContinueMethod.OVERLAY").setDescription("When using this ContinueMethod, you don't need to call tourGuide.next() explicitly, TourGuide will do it for you.").setGravity(Gravity.TOP)).playLater(mButton3);
    Sequence sequence = new Sequence.SequenceBuilder().add(tourGuide1, tourGuide2, tourGuide3).setDefaultOverlay(new Overlay().setEnterAnimation(mEnterAnimation).setExitAnimation(mExitAnimation)).setDefaultPointer(null).setContinueMethod(Sequence.ContinueMethod.OVERLAY).build();
    ChainTourGuide.init(this).playInSequence(sequence);
}
Also used : ToolTip(tourguide.tourguide.ToolTip) ChainTourGuide(tourguide.tourguide.ChainTourGuide) Sequence(tourguide.tourguide.Sequence) Overlay(tourguide.tourguide.Overlay)

Example 3 with Sequence

use of tourguide.tourguide.Sequence in project TourGuide by worker8.

the class SequenceOverlayCMTestActivity method runOverlay_ContinueMethod.

private void runOverlay_ContinueMethod() {
    mDefaultOverlay = new Overlay().setEnterAnimation(mEnterAnimation).setExitAnimation(mExitAnimation);
    // the return handler is used to manipulate the cleanup of all the tutorial elements
    mOverlayTG1 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle(TEST_TITLE1).setDescription("1").setGravity(Gravity.BOTTOM)).playLater(mButton1);
    Log.d("ddw", "mOverlayTG1.getOverlay(): " + mOverlayTG1.getOverlay());
    mOverlayTG2 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle(TEST_TITLE2).setDescription("2").setGravity(Gravity.BOTTOM | Gravity.LEFT).setBackgroundColor(Color.parseColor("#c0392b"))).setOverlay(new Overlay().setBackgroundColor(Color.parseColor("#EE2c3e50")).setEnterAnimation(mEnterAnimation).setExitAnimation(mExitAnimation)).playLater(mButton2);
    mOverlayTG3 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle(TEST_TITLE3).setDescription("3").setGravity(Gravity.TOP)).playLater(mButton3);
    if (mIsTestException) {
        mDefaultOverlay.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
            // do nothing, just for test purpose
            }
        });
    }
    Sequence sequence = new Sequence.SequenceBuilder().add(mOverlayTG1, mOverlayTG2, mOverlayTG3).setDefaultOverlay(mDefaultOverlay).setDefaultPointer(null).setContinueMethod(Sequence.ContinueMethod.OVERLAY).build();
    mSequenceManagerTG = ChainTourGuide.init(this).playInSequence(sequence);
}
Also used : ToolTip(tourguide.tourguide.ToolTip) Sequence(tourguide.tourguide.Sequence) Overlay(tourguide.tourguide.Overlay) View(android.view.View)

Aggregations

Overlay (tourguide.tourguide.Overlay)3 Sequence (tourguide.tourguide.Sequence)3 ToolTip (tourguide.tourguide.ToolTip)3 View (android.view.View)2 ChainTourGuide (tourguide.tourguide.ChainTourGuide)2