Class ArticleConfiguration.Builder

    • Constructor Summary

      Constructors 
      Constructor and Description
      Builder()
      Constructs an instance with a blank configuration
      Builder(Article article)
      Constructs an instance from the given article model
      Builder(long articleId)
      Constructs an instance from the given articleId and title
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Configuration config()
      Create a Configuration for the passed in configuration options.
      Intent intent(Context context, Configuration... configurations)
      Create an Intent to start the ViewArticleActivity with the specified configuration options.
      Intent intent(Context context, java.util.List<Configuration> configurations)
      Create an Intent to start the ViewArticleActivity with the specified configuration options.
      void show(Context context, Configuration... configurations)
      Shows the activity.
      void show(Context context, java.util.List<Configuration> configurations)
      Shows the activity.
      ArticleConfiguration.Builder withContactUsButtonVisible(boolean contactUsVisible)
      Define which screens the "ContactUs" Floating Action Button should be shown on.
      ArticleConfiguration.Builder withDeflectionEnabled(boolean deflectionEnabled)
      Specifies whether a deflection mechanism should be shown (if one is present) when the contact us button is pressed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        public Builder(long articleId)
        Constructs an instance from the given articleId and title
        Parameters:
        articleId - The ID of the article you want to display
      • Builder

        public Builder(Article article)
        Constructs an instance from the given article model
        Parameters:
        article - The article that you want to display
      • Builder

        public Builder()
        Constructs an instance with a blank configuration
    • Method Detail

      • withContactUsButtonVisible

        public ArticleConfiguration.Builder withContactUsButtonVisible(boolean contactUsVisible)
        Define which screens the "ContactUs" Floating Action Button should be shown on.
        Parameters:
        contactUsVisible - Boolean value to determine where the contact button is visible
      • withDeflectionEnabled

        public ArticleConfiguration.Builder withDeflectionEnabled(boolean deflectionEnabled)
        Specifies whether a deflection mechanism should be shown (if one is present) when the contact us button is pressed. If this is false, the button press will navigate directly to the RequestActivity. If not specified, a default value of true is used.
        Parameters:
        deflectionEnabled - whether a deflection mechanism will be shown if present.
        Returns:
        The Builder
      • show

        public void show(Context context,
                         Configuration... configurations)
        Shows the activity.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from ViewArticleActivity.
      • show

        public void show(Context context,
                         java.util.List<Configuration> configurations)
        Shows the activity.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from ViewArticleActivity.
      • intent

        public Intent intent(Context context,
                             Configuration... configurations)
        Create an Intent to start the ViewArticleActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from ViewArticleActivity.
        Returns:
        an Intent for ViewArticleActivity with the specified configuration options
      • intent

        public Intent intent(Context context,
                             java.util.List<Configuration> configurations)
        Create an Intent to start the ViewArticleActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        configurations - Configurations for Activities that can be started from ViewArticleActivity.
        Returns:
        an Intent for ViewArticleActivity with the specified configuration options
      • config

        public Configuration config()
        Create a Configuration for the passed in configuration options.