Class PdfSearchViewModular

  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback , android.view.KeyEvent.Callback , android.view.ViewManager , android.view.ViewParent , android.view.accessibility.AccessibilityEventSource , com.pspdfkit.listeners.DocumentListener , com.pspdfkit.ui.PSPDFKitViews.PSPDFView , com.pspdfkit.ui.search.PdfSearchView

    
    public final class PdfSearchViewModular
    extends AbstractPdfSearchView implements PSPDFKitViews.PSPDFView
                        

    Search view sitting inside a panel that slides in above the rest of the content.

    • Constructor Detail

      • PdfSearchViewModular

        PdfSearchViewModular(Context context)
    • Method Detail

      • getBackgroundColor

        @ColorInt() int getBackgroundColor()

        Returns background color of the modular search view.

        Returns:

        Modular search view background color.

      • setBackgroundColor

         void setBackgroundColor(@ColorInt() int backgroundColor)

        Sets background color of the modular search view.

        Parameters:
        backgroundColor - Modular search view background color.
      • getInputFieldTextColor

        @ColorInt() int getInputFieldTextColor()

        Returns modular search input field text color.

        Returns:

        Text color of the input field.

      • setInputFieldTextColor

         void setInputFieldTextColor(@ColorInt() int inputFieldTextColor)

        Sets modular search input field text color.

        Parameters:
        inputFieldTextColor - Text color of the input field.
      • getInputFieldHintColor

        @ColorInt() int getInputFieldHintColor()

        Returns modular search input field hint text color.

        Returns:

        Hint text color of the input field.

      • setInputFieldHintColor

         void setInputFieldHintColor(@ColorInt() int inputFieldHintColor)

        Sets modular search input field hint text color.

        Parameters:
        inputFieldHintColor - Hint text color of the input field.
      • getInputFieldBackgroundColor

        @ColorInt() int getInputFieldBackgroundColor()

        Returns modular search input field background color.

        Returns:

        Background color of the search input field.

      • setInputFieldBackgroundColor

         void setInputFieldBackgroundColor(@ColorInt() int inputFieldBackgroundColor)

        Sets modular search input field background color.

        Parameters:
        inputFieldBackgroundColor - Background color of the search input field.
      • getSeparatorColor

        @ColorInt() int getSeparatorColor()

        Returns the input field separator color.

        Returns:

        Color of the horizontal line separator below the input field.

      • setSeparatorColor

         void setSeparatorColor(@ColorInt() int separatorColor)

        Sets the input field separator color.

        Parameters:
        separatorColor - Color of the horizontal line separator below the input field.
      • setListSelector

         void setListSelector(@DrawableRes() int listSelector)

        Sets the list item selector.

        Parameters:
        listSelector - Search result list item selector.
      • getListItemBackgroundColor

         void getListItemBackgroundColor(@ColorInt() int listItemBackgroundColor)

        Sets the background color of the list items.

        Parameters:
        listItemBackgroundColor - Background color of the list items.
      • getListItemTitleColor

        @ColorInt() int getListItemTitleColor()

        Returns the title color of the list items.

        Returns:

        Text color of the list item title (page number).

      • setListItemTitleColor

         void setListItemTitleColor(@ColorInt() int listItemTitleColor)

        Sets the title color of the list items.

        Parameters:
        listItemTitleColor - Text color of the list item title (page number).
      • getListItemSubtitleColor

        @ColorInt() int getListItemSubtitleColor()

        Returns the text color of the list item subtitle.

        Returns:

        Text color of the list item subtitle (search snippet).

      • setListItemSubtitleColor

         void setListItemSubtitleColor(@ColorInt() int listItemSubtitleColor)

        Sets the text color of the list item subtitle.

        Parameters:
        listItemSubtitleColor - Text color of the list item subtitle (search snippet).
      • getHighlightBackgroundColor

        @ColorInt() int getHighlightBackgroundColor()

        Returns the background color of the highlighted search result.

        Returns:

        Highlighted search result background color.

      • setHighlightBackgroundColor

         void setHighlightBackgroundColor(@ColorInt() int highlightBackgroundColor)

        Sets the background color of the highlighted search result.

        Parameters:
        highlightBackgroundColor - Highlighted search result background color.
      • getHighlightTextColor

        @ColorInt() int getHighlightTextColor()

        Returns the text color of the highlighted search result.

        Returns:

        Highlighted search result text color.

      • setHighlightTextColor

         void setHighlightTextColor(@ColorInt() int highlightTextColor)

        Sets the text color of the highlighted search result.

        Parameters:
        highlightTextColor - Highlighted search result text color.
      • getHighlightBorderColor

        @ColorInt() int getHighlightBorderColor()

        Returns the border color of the highlighted search result.

        Returns:

        Border color of the highlighted search result.

      • setHighlightBorderColor

         void setHighlightBorderColor(@ColorInt() int highlightBorderColor)

        Sets the border color of the highlighted search result.

        Parameters:
        highlightBorderColor - Border color of the highlighted search result.
      • onSearchStarted

         void onSearchStarted(@NonNull() String query)

        Called when a fresh search has been started.

        Parameters:
        query - Search term.
      • onSearchError

         void onSearchError(@NonNull() Throwable ex)

        Called in case of an error that prevented searching the document.

        Parameters:
        ex - Throwable containing the search error reason.
      • onSearchCanceled

         void onSearchCanceled()

        Called when search has been cancelled.

      • show

         void show()

        Shows the modular search view.

      • hide

         void hide()

        Hides the modular search view.