感谢大神:https://github.com/worker8/TourGuide
感谢大神:https://github.com/TakuSemba/Spotlight
TourGuide
Demo
ToolTip gravity<a name="pointer_customization"></a>Pointer Customization Guide
Pointer is the round button that is animating to indicate the clickable UI element. The default color is white and the default gravity is center. You can customize it by:
new Pointer().setColor(Color.RED).setGravity(Gravity.BOTTOM|Gravity.RIGHT);
This is a comparison with and without the customization:
Pointer Customization<a name="overlay_customization"></a>Overlay Customization Guide
Overlay is the semi-transparent background that is used to cover up other UI elements so that users can take focus on what to click on. The color and shape can be customized by:
Overlay overlay = new Overlay()
.setBackgroundColor(Color.parseColor("#AAFF0000"))
.disableClick(true)
.setStyle(Overlay.Style.Rectangle);
-
disableClick(true)
will make elements covered by the overlay to become unclickable. Refer to Overlay Customization Activity in the example. -
.setStyle()
Currently only 2 styles are available:Overlay.Style.Rectangle
andOverlay.Style.Circle
Running TourGuide in Sequence
Running TourGuide in sequence is a very common use case where you want to show a few buttons in a row instead of just one. Running in sequence can be subdivided into 2 use cases:
- Case 1: When you want user to click on the button itself to proceed to next TourGuide
- Refer to ManualSequenceActivity.java in the demo
- Case 2: When you don't want user to actually click on the button itself, but the Overlay to proceed to next TourGuide
- Refer to OverlaySequenceTourActivity.java in the demo
网友评论