Class MaterialTapTargetSequence


  • public class MaterialTapTargetSequence
    extends java.lang.Object
    A Sequence of prompts to be shown one after another
    • Constructor Detail

      • MaterialTapTargetSequence

        public MaterialTapTargetSequence()
    • Method Detail

      • addPrompt

        @NonNull
        public MaterialTapTargetSequence addPrompt​(@Nullable
                                                   MaterialTapTargetPrompt prompt,
                                                   long milliseconds)
        Add a show for time prompt to the end of the sequence.
        Parameters:
        prompt - The prompt to add.
        milliseconds - The number of milliseconds to show the prompt for.
        Returns:
        This.
      • addPrompt

        @NonNull
        public MaterialTapTargetSequence addPrompt​(@NonNull
                                                   PromptOptions promptOptions)
        Add a prompt to the end of the sequence.
        Parameters:
        promptOptions - The prompt to add.
        Returns:
        This.
      • addPrompt

        @NonNull
        public MaterialTapTargetSequence addPrompt​(@NonNull
                                                   PromptOptions promptOptions,
                                                   long milliseconds)
        Add a show for time prompt to the end of the sequence.
        Parameters:
        promptOptions - The prompt to add.
        milliseconds - The number of milliseconds to show the prompt for.
        Returns:
        This.
      • size

        public int size()
        Get the number of prompts in this sequence.
        Returns:
        The number of prompts in this sequence.
      • get

        @NonNull
        public SequenceItem get​(int index)
        Gets a prompt at a position in this sequence.
        Parameters:
        index - The prompt 0 based index.
        Returns:
        The prompt at the specified position in this sequence.
      • finish

        @NonNull
        public MaterialTapTargetSequence finish()
        Removes the currently displayed prompt in the sequence from view using the finish action and stops the sequence from continuing.
        Returns:
        This.
      • dismiss

        @NonNull
        public MaterialTapTargetSequence dismiss()
        Removes the currently displayed prompt in the sequence from view using the dismiss action and stops the sequence from continuing.
        Returns:
        This.
      • showFromIndex

        @NonNull
        public MaterialTapTargetSequence showFromIndex​(int index)
        Shows or continues to show this sequence from the prompt at the index supplied.
        Parameters:
        index - The index to show from.
        Returns:
        This.