-
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: TranslucentStyle
and FullscreenStyle
. Specify them like the following:
new IntroductionBuilder(this).withSlides(generateSlides())
.withStyle(new FullscreenStyle()).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 and one that notifies you, when a Slide was initialized. The listener looks like the following:
new IntroductionBuilder(this).withSlides(slides)
.withOnSlideListener(new OnSlideListener() {
@Override
public void onSlideChanged(int from, int to) {
//Do something here
}
@Override
protected void onSlideInit(int position, @NonNull TextView title,
@NonNull ImageView image, @NonNull TextView description) {
//Do something here
}
}).introduceMyself();
You can use this listener for various purposes. See the Runtime Permissions and the Asynchronous image loading & GIFs wiki pages for examples.
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.