Search in sources :

Example 1 with ChainTourGuide

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

the class SequenceTestActivity method runOverlayContinueMethod.

private void runOverlayContinueMethod() {
    // the return handler is used to manipulate the cleanup of all the tutorial elements
    ChainTourGuide mTG1 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Hey!").setDescription("I'm the top fellow").setGravity(Gravity.RIGHT)).playLater(button);
    ChainTourGuide mTG2 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Hey!").setDescription("Just the middle man").setGravity(Gravity.BOTTOM | Gravity.LEFT)).setOverlay(new Overlay().setEnterAnimation(enterAnimation).setExitAnimation(exitAnimation).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SequenceTestActivity.this, "Bello! This is the default Overlay", Toast.LENGTH_SHORT).show();
            mTutorialHandler.next();
        }
    })).playLater(button2);
    ChainTourGuide mTG3 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Hey!").setDescription("It's time to say goodbye").setGravity(Gravity.TOP | Gravity.RIGHT)).playLater(button3);
    mSequence = new Sequence.SequenceBuilder().add(mTG1, mTG2, mTG3).setDefaultOverlay(new Overlay().setEnterAnimation(enterAnimation).setExitAnimation(exitAnimation).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SequenceTestActivity.this, "Bello! This is the default Overlay", Toast.LENGTH_SHORT).show();
            mTutorialHandler.next();
        }
    })).setDefaultPointer(new Pointer()).setContinueMethod(Sequence.ContinueMethod.OVERLAY).build();
    mTutorialHandler = ChainTourGuide.init(this).playInSequence(mSequence);
}
Also used : ToolTip(tourguide.tourguide.ToolTip) ChainTourGuide(tourguide.tourguide.ChainTourGuide) Pointer(tourguide.tourguide.Pointer) Overlay(tourguide.tourguide.Overlay) View(android.view.View)

Example 2 with ChainTourGuide

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

the class SequenceTestActivity method runOverlayListenerContinueMethod.

private void runOverlayListenerContinueMethod() {
    // the return handler is used to manipulate the cleanup of all the tutorial elements
    ChainTourGuide mTG1 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Hey!").setDescription("I'm the top fellow").setGravity(Gravity.RIGHT)).playLater(button);
    ChainTourGuide mTG2 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Hey!").setDescription("Just the middle man").setGravity(Gravity.BOTTOM | Gravity.LEFT)).setOverlay(new Overlay().setEnterAnimation(enterAnimation).setExitAnimation(exitAnimation)).playLater(button2);
    ChainTourGuide mTG3 = ChainTourGuide.init(this).setToolTip(new ToolTip().setTitle("Hey!").setDescription("It's time to say goodbye").setGravity(Gravity.TOP | Gravity.RIGHT)).playLater(button3);
    mSequence = new Sequence.SequenceBuilder().add(mTG1, mTG2, mTG3).setDefaultOverlay(new Overlay().setEnterAnimation(enterAnimation).setExitAnimation(exitAnimation).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SequenceTestActivity.this, "Bello! This is the default Overlay", Toast.LENGTH_SHORT).show();
            mTutorialHandler.next();
        }
    })).setDefaultPointer(new Pointer()).setContinueMethod(Sequence.ContinueMethod.OVERLAY_LISTENER).build();
    mTutorialHandler = ChainTourGuide.init(this).playInSequence(mSequence);
}
Also used : ToolTip(tourguide.tourguide.ToolTip) ChainTourGuide(tourguide.tourguide.ChainTourGuide) Pointer(tourguide.tourguide.Pointer) Overlay(tourguide.tourguide.Overlay) View(android.view.View)

Example 3 with ChainTourGuide

use of tourguide.tourguide.ChainTourGuide 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 4 with ChainTourGuide

use of tourguide.tourguide.ChainTourGuide 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)

Aggregations

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