public static class WelcomeConfiguration.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(android.content.Context context)
Creates a new Builder
|
Modifier and Type | Method and Description |
---|---|
WelcomeConfiguration.Builder |
animateButtons(boolean animateButtons)
Set whether or not the buttons fade out/in when changing visibilty
|
WelcomeConfiguration.Builder |
backButtonNavigatesPages(boolean navigatesPages)
Set whether or not pressing the back button will move to the previous page in the welcome screen.
|
WelcomeConfiguration.Builder |
backButtonSkips(boolean backButtonSkips)
Only applies if skipping is allowed.
|
WelcomeConfiguration.Builder |
bottomLayout(WelcomeConfiguration.BottomLayout layout)
Set the bottom layout to be used
|
WelcomeConfiguration |
build()
Builds the configuration
|
WelcomeConfiguration.Builder |
canSkip(boolean canSkip)
Sets whether or not the welcome screen can be skipped.
|
WelcomeConfiguration.Builder |
defaultBackgroundColor(BackgroundColor backgroundColor)
Set the color to be used when no background color is specified for a page.
|
WelcomeConfiguration.Builder |
defaultBackgroundColor(int resId)
Set the color to be used when no background color is specified for a page
Default is colorPrimary if available (support library or lollipop+), otherwise material blue 600
|
WelcomeConfiguration.Builder |
defaultDescriptionTypefacePath(java.lang.String typefacePath)
Set the path to a typeface (in assets) to be used by default for descriptions
|
WelcomeConfiguration.Builder |
defaultHeaderTypefacePath(java.lang.String typefacePath)
Set the path to a typeface (in assets) to be used by default for headers
|
WelcomeConfiguration.Builder |
defaultTitleTypefacePath(java.lang.String typefacePath)
Set the path to a typeface (in assets) to be used by default for titles
|
WelcomeConfiguration.Builder |
doneButtonTypefacePath(java.lang.String typefacePath)
Set the path to a typeface (in assets) to be used for the done button
|
WelcomeConfiguration.Builder |
exitAnimation(int exitAnimationResId)
Set the animation that is used when the welcome screen closes
|
WelcomeConfiguration.Builder |
page(WelcomePage page)
Adds a page, uses the default background color
|
WelcomeConfiguration.Builder |
showActionBarBackButton(boolean showBackButton)
If the action bar is enabled, setting this to true will cause the back
button to be shown.
|
WelcomeConfiguration.Builder |
showNextButton(boolean showNextButton)
Set the visibility of the next button
|
WelcomeConfiguration.Builder |
showPrevButton(boolean showPrevButton)
Sets the visibility of the previous button (navigates back through the pages).
|
WelcomeConfiguration.Builder |
skipButtonTypefacePath(java.lang.String typefacePath)
Set the path to a typeface (in assets) to be used for the skip button
|
WelcomeConfiguration.Builder |
swipeToDismiss(boolean swipeToDismiss)
Enables or disables swipe to dismiss (disabled by default)
|
WelcomeConfiguration.Builder |
useCustomDoneButton(boolean useCustomDoneButton)
Indicate that a done button is going to be provided in a custom fragment.
|
public Builder(android.content.Context context)
context
- Context objectpublic WelcomeConfiguration build()
WelcomeConfiguration
with the parameters set on this objectpublic WelcomeConfiguration.Builder swipeToDismiss(boolean swipeToDismiss)
swipeToDismiss
- True to enable swipe to dismiss, false to disable itpublic WelcomeConfiguration.Builder canSkip(boolean canSkip)
canSkip
- True to allow skipping, false to disable itpublic WelcomeConfiguration.Builder backButtonSkips(boolean backButtonSkips)
backButtonSkips
- True to allow the back button to skip the welcome screen, false to disable itpublic WelcomeConfiguration.Builder backButtonNavigatesPages(boolean navigatesPages)
public WelcomeConfiguration.Builder animateButtons(boolean animateButtons)
animateButtons
- True to animate buttons, false to notpublic WelcomeConfiguration.Builder useCustomDoneButton(boolean useCustomDoneButton)
WelcomeScreenFinisher.finish()
in your button's onClickListener
to close the welcome screen correctly.useCustomDoneButton
- Whether or not a done button will be present in the last fragmentpublic WelcomeConfiguration.Builder showNextButton(boolean showNextButton)
showNextButton
- Whether or not to show the next buttonpublic WelcomeConfiguration.Builder showPrevButton(boolean showPrevButton)
showPrevButton
- Whether or not to show the previous buttonpublic WelcomeConfiguration.Builder showActionBarBackButton(boolean showBackButton)
showBackButton
- Whether or not to show the back button on the action barpublic WelcomeConfiguration.Builder skipButtonTypefacePath(java.lang.String typefacePath)
typefacePath
- The path to a typeface file in assets folderpublic WelcomeConfiguration.Builder doneButtonTypefacePath(java.lang.String typefacePath)
typefacePath
- The path to a typeface file in assets folderpublic WelcomeConfiguration.Builder defaultTitleTypefacePath(java.lang.String typefacePath)
typefacePath
- The path to a typeface file in assets folderpublic WelcomeConfiguration.Builder defaultHeaderTypefacePath(java.lang.String typefacePath)
typefacePath
- The path to a typeface file in assets folderpublic WelcomeConfiguration.Builder defaultDescriptionTypefacePath(java.lang.String typefacePath)
typefacePath
- The path to a typeface file in assets folderpublic WelcomeConfiguration.Builder exitAnimation(@AnimRes int exitAnimationResId)
exitAnimationResId
- The resource id of the animation to usepublic WelcomeConfiguration.Builder defaultBackgroundColor(@ColorRes int resId)
resId
- The color resource id to use as the default background colorpublic WelcomeConfiguration.Builder defaultBackgroundColor(BackgroundColor backgroundColor)
backgroundColor
- BackgroundColor to use as the default background colorpublic WelcomeConfiguration.Builder bottomLayout(WelcomeConfiguration.BottomLayout layout)
layout
- Bottom layoutpublic WelcomeConfiguration.Builder page(WelcomePage page)
page
- The page to add