-
Notifications
You must be signed in to change notification settings - Fork 58
IntroductionBuilder
Add your Slides to the Builder. See the Wiki page for Slide to see how to implement a Slide.
Specify the Style to use. There are currently 2 available Styles: Translucent
and Fullscreen
. Specify them like the following:
new IntroductionBuilder(this).withSlides(generateSlides())
.withStyle(IntroductionBuilder.STYLE_FULLSCREEN).introduceMyself();
The default Style is Translucent
.
Use a custom IndicatorManager. See the wiki page for a custom IndicatorManager to see how to implement one. Use it like the following:
new IntroductionBuilder(this).withSlides(generateSlides()).withIndicatorManager(new MyCustomIndicatorManager())
.introduceMyself();
Enable or disable the "previous"-Button. Note: It will be still possible to move backwards as the user still can scroll through the Slides.
Enable or disable the Indicator. If disabled there will be no Indicator at the bottom, even if you specified a custom one.
Force a Orientation, disabling the ability to rotate the Device. This is for design purposes. Available are portrait
, landscape
and both
. The default is both
.
Add a Listener that captures all moves through the Slides. The listener looks like the following:
new IntroductionBuilder(this).withSlides(generateSlides())
.withOnSlideChangedListener(new IntroductionConfiguration.OnSlideChangedListener() {
@Override
public void onSlideChanged(int from, int to) {
//Do something here
}
}).introduceMyself();
You can use this listener for various purposes. See the Runtime Permissions wiki page for an example.
Apply a custom PageTransformer
to display cool animations. See the classes DepthPageTransformer
and ZoomOutPageTransformer
in the sample for working implementations.
Call this method if you did all of the configurations you wanted to finally start the Activity with your Slides.