public static class

ArticleWebViewConfiguration.Builder

extends Object
java.lang.Object
   ↳ com.salesforce.android.knowledge.ui.ArticleWebViewConfiguration.Builder

Class Overview

A Builder for constructing ArticleWebViewConfiguration objects.

Summary

Public Constructors
Builder(KnowledgeClient client)
Creates a new Builder with the minimum required settings for displaying the ArticleDetails.
Public Methods
ArticleWebViewConfiguration build()
Constructs a new ArticleWebViewConfiguration
ArticleWebViewConfiguration.Builder setClient(KnowledgeClient client)
Set the KnowledgeClient used in the ArticleWebView.
ArticleWebViewConfiguration.Builder setCssProvider(KnowledgeCssProvider cssProvider)
Set the KnowledgeCssProvider used to inject CSS to the webview.
ArticleWebViewConfiguration.Builder setJsProvider(KnowledgeJsProvider jsProvider)
Set the KnowledgeJsProvider used to inject JS to the webview.
ArticleWebViewConfiguration.Builder setWebResourceErrorListener(ArticleWebView.WebResourceErrorListener webResourceErrorListener)
Set the ArticleWebView.WebResourceErrorListener used to report errors encounter whilst the Webview is loading resources.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder (KnowledgeClient client)

Creates a new Builder with the minimum required settings for displaying the ArticleDetails.

Parameters
client The KnowledgeClient providing Offline resource access.
Returns
  • The Builder instance for fluent API calls.

Public Methods

public ArticleWebViewConfiguration build ()

Constructs a new ArticleWebViewConfiguration

public ArticleWebViewConfiguration.Builder setCssProvider (KnowledgeCssProvider cssProvider)

Set the KnowledgeCssProvider used to inject CSS to the webview.

Returns
  • The Builder instance for fluent API calls.

public ArticleWebViewConfiguration.Builder setJsProvider (KnowledgeJsProvider jsProvider)

Set the KnowledgeJsProvider used to inject JS to the webview.

public ArticleWebViewConfiguration.Builder setWebResourceErrorListener (ArticleWebView.WebResourceErrorListener webResourceErrorListener)

Set the ArticleWebView.WebResourceErrorListener used to report errors encounter whilst the Webview is loading resources.

Returns
  • The Builder instance for fluent API calls.