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

public interface Tutorial<T,V> extends ViewPager.OnPageChangeListener
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.

  • Field Details

    • ADS_TUTORIAL_WELCOME

      static final int ADS_TUTORIAL_WELCOME
      Constant for the first tutorial page.
      See Also:
    • ADS_NAME_TUTORIAL

      static final String ADS_NAME_TUTORIAL
      Activity scene transition name for the tutorial.
      See Also:
    • ADS_NAME_TUTORIAL_IMAGE

      static final String ADS_NAME_TUTORIAL_IMAGE
      Activity scene transition name for the tutorial image.
      See Also:
    • ADS_NAME_TUTORIAL_TITLE

      static final String ADS_NAME_TUTORIAL_TITLE
      Activity scene transition name for the tutorial title.
      See Also:
    • ADS_NAME_TUTORIAL_SUBTITLE

      static final String 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

      @NonNull T getTutorial()
      Returns the tutorial object.
      Returns:
      The tutorial object.
    • createTutorial

      @NonNull V createTutorial()
      Returns the tutorial view or fragment.
      Returns:
      The tutorial view or fragment.
    • getColor

      @ColorInt int getColor()
      Returns the color used by this tutorial.
      Returns:
      The color used by this tutorial.
    • getTintColor

      @ColorInt int getTintColor()
      Returns the tint color used by this tutorial.
      Returns:
      The tint color used by this tutorial.
    • onColorChanged

      void onColorChanged(@ColorInt int color, @ColorInt int tintColor)
      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.