Class SupportActivity.Builder

  • Enclosing class:
    SupportActivity


    public static class SupportActivity.Builder
    extends java.lang.Object
    This builder is used to generate the startup configuration for the Activity. Note that only one of the following may be specified. If you specify both, then the last to be specified is used:
    • withArticlesForCategoryIds
    • withArticlesForSectionIds
    • Method Detail

      • withArticlesForCategoryIds

        public SupportActivity.Builder withArticlesForCategoryIds(long... categoryIds)
        Specifies a startup configuration which will show articles for a given set of category IDs
        Parameters:
        categoryIds - the category Ids to list articles for
        Returns:
        the builder
      • withArticlesForSectionIds

        public SupportActivity.Builder withArticlesForSectionIds(long... sectionIds)
        Specifies a startup configuration which will show articles for a given set of section IDs
        Parameters:
        sectionIds - the section IDs to list articles for
        Returns:
        the builder
      • withContactUsButtonVisibility

        public SupportActivity.Builder withContactUsButtonVisibility(ContactUsButtonVisibility contactUsButtonVisibility)
        Define which screens the "contact us" Floating Action Button should be shown on.
        Parameters:
        contactUsButtonVisibility - Enum value to determine where the contact button is visible
        Returns:
        The builder
      • withLabelNames

        public SupportActivity.Builder withLabelNames(java.lang.String... labelNames)
        Specifies a startup configuration which will restrict the shown articles to ones that match the provided label names.
        Parameters:
        labelNames - the array of label names to which the Help Center will be restricted.
        Returns:
        The Builder
      • withCategoriesCollapsed

        public SupportActivity.Builder withCategoriesCollapsed(boolean categoriesCollapsed)
        Specifies whether or not to show all categories in the Help Center in their collapsed state when the content loads. If not specified, a default value of false is used.
        Parameters:
        categoriesCollapsed - true if the Help Center should initially show all categories in their collapsed state, false if categories should be shown in their expanded state, with sections and articles listed underneath.
        Returns:
        The Builder
      • showConversationsMenuButton

        public SupportActivity.Builder showConversationsMenuButton(boolean showConversationsMenuButton)
        Client-side API to specify whether or not to show the conversations button in the Toolbar of the SupportActivity. If not specified, a default value of true is used. The value is used in conjunction with the conversations settings from the server. If conversations are not enabled on the server, the value provided here will not be taken into account. Only if both values evaluate to true will the menu item will be shown in the Toolbar.
        Parameters:
        showConversationsMenuButton - true if the conversations menu item should be shown in the Toolbar, false if not.
        Returns:
        The Builder
      • withArticleVoting

        public SupportActivity.Builder withArticleVoting(boolean articleVotingEnabled)
        Specifies whether voting on articles should be enabled or disabled. Enabled by default.
        Parameters:
        articleVotingEnabled - true if article voting should be enabled, false if it should be disabled.
        Returns:
        The Builder
      • show

        public void show(Context context)
        Shows the activity.
        Parameters:
        context - The context which startActivity will be invoked on