Class SupportActivity

  • All Implemented Interfaces:
    SupportMvp.View


    public class SupportActivity
    extends AppCompatActivity
    implements SupportMvp.View
    This Activity is the main entry point for showing Help Center content in the SDK.

    This Activity is designed to be started with the SupportActivity.Builder

    • Constructor Detail

      • SupportActivity

        public SupportActivity()
    • Method Detail

      • onCreate

        protected void onCreate(Bundle savedInstanceState)
      • onResume

        protected void onResume()
      • onPause

        protected void onPause()
      • onCreateOptionsMenu

        public boolean onCreateOptionsMenu(Menu menu)
      • onPrepareOptionsMenu

        public boolean onPrepareOptionsMenu(Menu menu)
      • onOptionsItemSelected

        public boolean onOptionsItemSelected(MenuItem item)
      • showHelp

        public void showHelp(SupportUiConfig supportUiConfig)
        Description copied from interface: SupportMvp.View
        Shows Help for the given SDK UI configuration.
        Specified by:
        showHelp in interface SupportMvp.View
        Parameters:
        supportUiConfig - The SupportUiConfig containing the category and section IDs, label names, and configuration flags to be used in displaying the UI.
      • showSearchResults

        public void showSearchResults(java.util.List<SearchArticle> searchArticles,
                                      java.lang.String query)
        Description copied from interface: SupportMvp.View
        Shows Help search results for the given query text
        Specified by:
        showSearchResults in interface SupportMvp.View
        Parameters:
        searchArticles - The List of articles returned for the search
        query - The query text that was used in the search
      • isShowingHelp

        public boolean isShowingHelp()
        Description copied from interface: SupportMvp.View
        Tells whether the view is currently showing the Help Center, or Search results. While this is the kind of logical decision normally calculated by the presenter, in this case, with state changes etc, the view is the ultimate source of truth.
        Specified by:
        isShowingHelp in interface SupportMvp.View
        Returns:
        true if the currently displayed view is the Help Center, false if it's search results.
      • showError

        public void showError(int errorMessageId)
        Description copied from interface: SupportMvp.View
        Shows a Snackbar with an error message
        Specified by:
        showError in interface SupportMvp.View
        Parameters:
        errorMessageId - The string resource ID to display
      • dismissError

        public void dismissError()
        Description copied from interface: SupportMvp.View
        Dismiss the error Snackbar if it is currently displayed.
        Specified by:
        dismissError in interface SupportMvp.View
      • getContext

        public Context getContext()
        Description copied from interface: SupportMvp.View
        Gets the View's context.
        Specified by:
        getContext in interface SupportMvp.View
        Returns:
        The Context of the View implementation.
      • onSaveInstanceState

        protected void onSaveInstanceState(Bundle outState)