Interface Tutorial<T,V>
- Type Parameters:
T
- The type of the tutorial.V
- The type of the view or fragment.
- All Superinterfaces:
ViewPager.OnPageChangeListener
- All Known Subinterfaces:
Tutorial.Motion<T,
V>
- All Known Implementing Classes:
DynamicTutorial
,DynamicTutorialFragment
Interface for the dynamic tutorial having useful methods which will be called by the
DynamicTutorialActivity
to perform color transitions.
Any child view or fragment must implement this interface to support any color transitions.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
ATutorial
to support animation(s) and shared element(s) transition. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Activity scene transition name for the tutorial.static final String
Activity scene transition name for the tutorial image.static final String
Activity scene transition name for the tutorial subtitle.static final String
Activity scene transition name for the tutorial title.static final int
Constant for the first tutorial page. -
Method Summary
Modifier and TypeMethodDescriptionReturns the tutorial view or fragment.int
getColor()
Returns the color used by this tutorial.int
Returns the tint color used by this tutorial.Returns the tutorial object.int
Returns the id for this tutorial.void
onColorChanged
(int color, int tintColor) This method will be called when there is a change in the colors of the activity.void
onSetPadding
(int left, int top, int right, int bottom) This method will be called on setting the padding of the tutorial.Methods inherited from interface androidx.viewpager.widget.ViewPager.OnPageChangeListener
onPageScrolled, onPageScrollStateChanged, onPageSelected
-
Field Details
-
ADS_TUTORIAL_WELCOME
static final int ADS_TUTORIAL_WELCOMEConstant for the first tutorial page.- See Also:
-
ADS_NAME_TUTORIAL
Activity scene transition name for the tutorial.- See Also:
-
ADS_NAME_TUTORIAL_IMAGE
Activity scene transition name for the tutorial image.- See Also:
-
ADS_NAME_TUTORIAL_TITLE
Activity scene transition name for the tutorial title.- See Also:
-
ADS_NAME_TUTORIAL_SUBTITLE
Activity scene transition name for the tutorial subtitle.- See Also:
-
-
Method Details
-
getTutorialId
int getTutorialId()Returns the id for this tutorial.- Returns:
- The id of this tutorial.
-
getTutorial
Returns the tutorial object.- Returns:
- The tutorial object.
-
createTutorial
Returns the tutorial view or fragment.- Returns:
- The tutorial view or fragment.
-
getColor
Returns the color used by this tutorial.- Returns:
- The color used by this tutorial.
-
getTintColor
Returns the tint color used by this tutorial.- Returns:
- The tint color used by this tutorial.
-
onColorChanged
This method will be called when there is a change in the colors of the activity.Implement this method to update any views during the transition.
- Parameters:
color
- The color used by the tutorial.tintColor
- The tint color used by this tutorial.
-
onSetPadding
void onSetPadding(int left, int top, int right, int bottom) This method will be called on setting the padding of the tutorial.Implement this method to update any views according to the container.
- Parameters:
left
- The left padding supplied by the container.top
- The top padding supplied by the container.right
- The right padding supplied by the container.bottom
- The bottom padding supplied by the container.
-