Class ArticleUiConfig.Builder

  • Enclosing class:
    ArticleUiConfig


    public static class ArticleUiConfig.Builder
    extends java.lang.Object
    This builder is used to generate an instance of ArticleUiConfig
    • 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
    • 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 ArticleUiConfig.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
      • show

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

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

        public Intent intent(Context context,
                             UiConfig... uiConfigs)
        Create an Intent to start the ViewArticleActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        uiConfigs - 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<UiConfig> uiConfigs)
        Create an Intent to start the ViewArticleActivity with the specified configuration options.
        Parameters:
        context - The context which startActivity will be invoked on
        uiConfigs - Configurations for Activities that can be started from ViewArticleActivity.
        Returns:
        an Intent for ViewArticleActivity with the specified configuration options
      • config

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