Package zendesk.support.guide
Class ArticleUiConfig.Builder
- java.lang.Object
-
- zendesk.support.guide.ArticleUiConfig.Builder
-
- Enclosing class:
- ArticleUiConfig
public static class ArticleUiConfig.Builder extends java.lang.ObjectThis builder is used to generate an instance ofArticleUiConfig
-
-
Constructor Summary
Constructors Constructor and Description Builder()Constructs an instance with a blank configurationBuilder(Article article)Constructs an instance from the given article modelBuilder(long articleId, java.lang.String title)Constructs an instance from the given articleId and title
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description UiConfigconfig()Create aUiConfigfor the passed in configuration options.Intentintent(Context context)Create anIntentto start theViewArticleActivitywith the specified configuration options.voidshow(Context context)Shows the activity.ArticleUiConfig.BuilderwithArticleVoting(boolean articleVoting)Specifies whether voting on articles should be enabled or disabled.ArticleUiConfig.BuilderwithContactUsButtonVisible(boolean contactUsVisible)Define which screens the "ContactUs" Floating Action Button should be shown on.ArticleUiConfig.BuilderwithUiConfigs(java.util.List<UiConfig> uiConfigs)Configurations for screen that can be started from ViewArticleActivity.ArticleUiConfig.BuilderwithUiConfigs(UiConfig... uiConfigs)Configurations for screen that can be started from ViewArticleActivity.
-
-
-
Constructor Detail
-
Builder
public Builder(long articleId, java.lang.String title)Constructs an instance from the given articleId and title- Parameters:
articleId- The ID of the article you want to displaytitle- The text that you want to show in the toolbar
-
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
-
withArticleVoting
public ArticleUiConfig.Builder withArticleVoting(boolean articleVoting)
Specifies whether voting on articles should be enabled or disabled.- Parameters:
articleVoting- true if article voting should be enabled, false if it should be disabled.
-
withUiConfigs
public ArticleUiConfig.Builder withUiConfigs(UiConfig... uiConfigs)
Configurations for screen that can be started from ViewArticleActivity.
-
withUiConfigs
public ArticleUiConfig.Builder withUiConfigs(java.util.List<UiConfig> uiConfigs)
Configurations for screen that can be started from ViewArticleActivity.
-
show
public void show(Context context)
Shows the activity.- Parameters:
context- The context whichstartActivitywill be invoked on
-
intent
public Intent intent(Context context)
Create anIntentto start theViewArticleActivitywith the specified configuration options.- Parameters:
context- The context whichstartActivitywill be invoked on- Returns:
- an Intent for
ViewArticleActivitywith the specified configuration options
-
-