Class ViewArticleActivity
- java.lang.Object
-
- AppCompatActivity
-
- com.zendesk.sdk.ui.NetworkAwareActionbarActivity
-
- com.zendesk.sdk.support.ViewArticleActivity
-
- All Implemented Interfaces:
- NetworkAware, Retryable
public class ViewArticleActivity extends NetworkAwareActionbarActivity
Activity used to render a Help Center articleThe recommended method of creating the activity is by using one of the static factory methods. The two simplest options are
ViewArticleActivity.startActivity(Context, Article)andViewArticleActivity.startActivity(Context, SimpleArticle). Both of these will start the Activity with article voting enabled and the "Contact Us"FloatingActionButtonenabled, with the defaultZendeskFeedbackConfiguration. There are two more static factory methods with extended parameters which allow you to customize the Activity as desired:ViewArticleActivity.startActivity(Context, Article, boolean, ZendeskFeedbackConfiguration, boolean)andViewArticleActivity.startActivity(Context, SimpleArticle, boolean, ZendeskFeedbackConfiguration, boolean).
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringEXTRA_ARTICLEstatic java.lang.StringEXTRA_ARTICLE_VOTING_ENABLEDstatic java.lang.StringEXTRA_SIMPLE_ARTICLE-
Fields inherited from class com.zendesk.sdk.ui.NetworkAwareActionbarActivity
mNetworkAvailable
-
-
Constructor Summary
Constructors Constructor and Description ViewArticleActivity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description protected voidonCreate(Bundle savedInstanceState)protected voidonDestroy()voidonItemClick(<any> parent, View view, int position, long id)booleanonOptionsItemSelected(MenuItem item)protected voidonPause()protected voidonResume()protected voidsetLoadingState(LoadingState loadingState)Sets the loading state of this fragment.static voidstartActivity(Context context, Article article)Starts the Activity on the givenArticle, with article voting enabled and the "Contact Us"FloatingActionButtonenabled.static voidstartActivity(Context context, Article article, boolean contactUsButtonEnabled, ZendeskFeedbackConfiguration feedbackConfiguration, boolean articleVotingEnabled)Starts the Activity on the givenArticle.static voidstartActivity(Context context, SimpleArticle simpleArticle)Starts the Activity on the givenSimpleArticle, with article voting enabled and the "Contact Us"FloatingActionButtonenabled.static voidstartActivity(Context context, SimpleArticle simpleArticle, boolean contactUsButtonEnabled, ZendeskFeedbackConfiguration feedbackConfiguration, boolean articleVotingEnabled)Starts the Activity on the givenSimpleArticle.-
Methods inherited from class com.zendesk.sdk.ui.NetworkAwareActionbarActivity
onNetworkAvailable, onNetworkUnavailable, onRetryAvailable, onRetryUnavailable
-
-
-
-
Field Detail
-
EXTRA_ARTICLE
public static final java.lang.String EXTRA_ARTICLE
- See Also:
- Constant Field Values
-
EXTRA_SIMPLE_ARTICLE
public static final java.lang.String EXTRA_SIMPLE_ARTICLE
- See Also:
- Constant Field Values
-
EXTRA_ARTICLE_VOTING_ENABLED
public static final java.lang.String EXTRA_ARTICLE_VOTING_ENABLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
startActivity
public static void startActivity(Context context, Article article, boolean contactUsButtonEnabled, ZendeskFeedbackConfiguration feedbackConfiguration, boolean articleVotingEnabled)Starts the Activity on the givenArticle.- Parameters:
context- Context to be used for Activity creationarticle- article model to be passed to the Activity for renderingcontactUsButtonEnabled- true to enable the Contact Us FAB, false to disablefeedbackConfiguration- The feedback configuration required to create a requestarticleVotingEnabled- true to enable article voting, false to disable
-
startActivity
public static void startActivity(Context context, Article article)Starts the Activity on the givenArticle, with article voting enabled and the "Contact Us"FloatingActionButtonenabled. To disable these features or apply aZendeskFeedbackConfiguration, seeViewArticleActivity.startActivity(Context, Article, boolean, ZendeskFeedbackConfiguration, boolean).- Parameters:
context- Context to be used for Activity creationarticle- article model to be passed to the Activity for rendering
-
startActivity
public static void startActivity(Context context, SimpleArticle simpleArticle, boolean contactUsButtonEnabled, ZendeskFeedbackConfiguration feedbackConfiguration, boolean articleVotingEnabled)Starts the Activity on the givenSimpleArticle.- Parameters:
context- Context to be used for Activity creationsimpleArticle- simplified article model to be passed to the Activity for renderingcontactUsButtonEnabled- true to enable the Contact Us FAB, false to disablefeedbackConfiguration- The feedback configuration required to create a requestarticleVotingEnabled- true to enable article voting, false to disable
-
startActivity
public static void startActivity(Context context, SimpleArticle simpleArticle)Starts the Activity on the givenSimpleArticle, with article voting enabled and the "Contact Us"FloatingActionButtonenabled. To disable these features or apply aZendeskFeedbackConfiguration, seeViewArticleActivity.startActivity(Context, SimpleArticle, boolean, ZendeskFeedbackConfiguration, boolean).- Parameters:
context- Context to be used for Activity creationsimpleArticle- Simplified article model to be passed to the Activity for rendering
-
onCreate
protected void onCreate(Bundle savedInstanceState)
- Overrides:
onCreatein classNetworkAwareActionbarActivity
-
onResume
protected void onResume()
- Overrides:
onResumein classNetworkAwareActionbarActivity
-
onPause
protected void onPause()
- Overrides:
onPausein classNetworkAwareActionbarActivity
-
onOptionsItemSelected
public boolean onOptionsItemSelected(MenuItem item)
-
setLoadingState
protected void setLoadingState(LoadingState loadingState)
Sets the loading state of this fragment.This controls the visibility of the views in this fragment and starts / stops progress indicators.
- Parameters:
loadingState- The loading state to set.
-
onItemClick
public void onItemClick(<any> parent, View view, int position, long id)
-
onDestroy
protected void onDestroy()
-
-