Class MaterialTapTargetPrompt.Builder

java.lang.Object
uk.co.samuelwall.materialtaptargetprompt.extras.PromptOptions<MaterialTapTargetPrompt.Builder>
uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt.Builder
Enclosing class:
MaterialTapTargetPrompt

public static class MaterialTapTargetPrompt.Builder
extends PromptOptions<MaterialTapTargetPrompt.Builder>
A builder to create a MaterialTapTargetPrompt instance.
  • Constructor Details

    • Builder

      public Builder​(@NonNull androidx.fragment.app.Fragment fragment)
      Creates a builder for a tap target prompt that uses the default tap target prompt theme.
      Parameters:
      fragment - the fragment to show the prompt within.
      See Also:
      Builder(Fragment, int)
    • Builder

      public Builder​(@NonNull androidx.fragment.app.Fragment fragment, int themeResId)
      Creates a builder for a material tap target prompt that uses an explicit theme resource.

      The themeResId may be specified as 0 to use the parent context's resolved value for R.attr.MaterialTapTargetPromptTheme.

      Parameters:
      fragment - the fragment to show the prompt within.
      themeResId - the resource ID of the theme against which to inflate this dialog, or 0 to use the parent context's default material tap target prompt theme
    • Builder

      public Builder​(@NonNull androidx.fragment.app.DialogFragment dialogFragment)
      Creates a builder for a tap target prompt that uses the default tap target prompt theme.
      Parameters:
      dialogFragment - the dialog fragment to show the prompt within.
      See Also:
      Builder(DialogFragment, int)
    • Builder

      public Builder​(@NonNull androidx.fragment.app.DialogFragment dialogFragment, int themeResId)
      Creates a builder for a material tap target prompt that uses an explicit theme resource.

      The themeResId may be specified as 0 to use the parent context's resolved value for R.attr.MaterialTapTargetPromptTheme.

      Parameters:
      dialogFragment - the dialog fragment to show the prompt within.
      themeResId - the resource ID of the theme against which to inflate this dialog, or 0 to use the parent context's default material tap target prompt theme
    • Builder

      public Builder​(@NonNull android.app.Dialog dialog)
      Creates a builder for a tap target prompt that uses the default tap target prompt theme.
      Parameters:
      dialog - the dialog to show the prompt within.
    • Builder

      public Builder​(@NonNull android.app.Dialog dialog, int themeResId)
      Creates a builder for a material tap target prompt that uses an explicit theme resource.

      The themeResId may be specified as 0 to use the parent context's resolved value for R.attr.MaterialTapTargetPromptTheme.

      Parameters:
      dialog - the dialog to show the prompt within.
      themeResId - the resource ID of the theme against which to inflate this dialog, or 0 to use the parent context's default material tap target prompt theme
    • Builder

      public Builder​(@NonNull android.app.Activity activity)
      Creates a builder for a tap target prompt that uses the default tap target prompt theme.
      Parameters:
      activity - the activity to show the prompt within.
    • Builder

      public Builder​(@NonNull android.app.Activity activity, int themeResId)
      Creates a builder for a material tap target prompt that uses an explicit theme resource.

      The themeResId may be specified as 0 to use the parent context's resolved value for R.attr.MaterialTapTargetPromptTheme.

      Parameters:
      activity - the activity to show the prompt within.
      themeResId - the resource ID of the theme against which to inflate this dialog, or 0 to use the parent context's default material tap target prompt theme
    • Builder

      public Builder​(@NonNull ResourceFinder resourceFinder, int themeResId)
      Creates a builder for a material tap target prompt that uses an explicit theme resource.

      The themeResId may be specified as 0 to use the parent context's resolved value for R.attr.MaterialTapTargetPromptTheme.

      Parameters:
      resourceFinder - The ResourceFinder used to find views and resources.
      themeResId - the resource ID of the theme against which to inflate this dialog, or 0 to use the parent context's default material tap target prompt theme