use of tourguide.tourguide.ToolTip in project TourGuide by worker8.
the class MemoryLeakTestActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_basic);
Button button = (Button) findViewById(R.id.button1);
mTutorialHandler = TourGuide.init(this).with(TourGuide.Technique.CLICK).setPointer(new Pointer()).setToolTip(new ToolTip().setTitle("Hey!").setDescription("Let's hope that there's no memory leak...")).setOverlay(new Overlay()).playOn(button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mTutorialHandler.cleanUp();
}
});
}
use of tourguide.tourguide.ToolTip in project TourGuide by worker8.
the class MultipleToolTipActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mActivity = this;
setContentView(R.layout.activity_multiple_tooltip);
Button button = (Button) findViewById(R.id.button);
Button button2 = (Button) findViewById(R.id.button2);
// the return handler is used to manipulate the cleanup of all the tutorial elements
mTutorialHandler = TourGuide.init(this).with(TourGuide.Technique.CLICK).setPointer(new Pointer()).setToolTip(new ToolTip().setTitle("Hey!").setDescription("I'm the top guy").setGravity(Gravity.RIGHT)).setOverlay(null).playOn(button);
mTutorialHandler2 = TourGuide.init(mActivity).with(TourGuide.Technique.CLICK).setPointer(new Pointer()).setToolTip(new ToolTip().setTitle("Hey!").setDescription("I'm the bottom guy").setGravity(Gravity.TOP | Gravity.LEFT)).setOverlay(null).playOn(button2);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mTutorialHandler.cleanUp();
}
});
button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mTutorialHandler2.cleanUp();
}
});
}
use of tourguide.tourguide.ToolTip in project TourGuide by worker8.
the class NoOverlayActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mActivity = this;
setContentView(R.layout.activity_basic);
final Button button1 = (Button) findViewById(R.id.button1);
final Button button2 = (Button) findViewById(R.id.button2);
// the return handler is used to manipulate the cleanup of all the tutorial elements
mTourGuideHandler = TourGuide.init(this).with(TourGuide.Technique.CLICK).setPointer(// set pointer to null
new Pointer()).setToolTip(new ToolTip().setTitle("Welcome :)").setDescription("Have a nice and fun day!")).setOverlay(null).playOn(button1);
button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mTourGuideHandler.cleanUp();
}
});
button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mTourGuideHandler.playOn(button1);
}
});
}
use of tourguide.tourguide.ToolTip 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);
}
Aggregations