Class PdfSearchViewInline

  • 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 PdfSearchViewInline
    extends AbstractPdfSearchView implements PSPDFKitViews.PSPDFView
                        

    Search view to be placed in the action bar of a AppCompatActivity.

    • Constructor Detail

      • PdfSearchViewInline

        PdfSearchViewInline(Context context)
    • Method Detail

      • getPrevIconColorTint

        @ColorInt() int getPrevIconColorTint()

        Returns the icon color for the previous search result icon.

        Returns:

        Tint color for the previous search result icon.

      • setPrevIconColorTint

         void setPrevIconColorTint(@ColorInt() int prevIconColorTint)

        Sets the icon color for the previous search result icon.

        Parameters:
        prevIconColorTint - Tint color for the previous search result icon.
      • getNextIconColorTint

        @ColorInt() int getNextIconColorTint()

        Returns the icon color for the next search result icon.

        Returns:

        Tint color for the next search result icon.

      • setNextIconColorTint

         void setNextIconColorTint(@ColorInt() int nextIconColorTint)

        Sets the icon color for the next search result icon.

        Parameters:
        nextIconColorTint - Tint color for the next search result icon.
      • getBackIconColorTint

        @ColorInt() int getBackIconColorTint()

        Returns the icon color for the back icon.

        Returns:

        Tint color for the back icon.

      • setBackIconColorTint

         void setBackIconColorTint(@ColorInt() int backIconColorTint)

        Sets the icon color for the back icon.

        Parameters:
        backIconColorTint - Tint color for the back icon.
      • getPrevIcon

        @DrawableRes() int getPrevIcon()

        Returns previous search result button icon.

        Returns:

        Previous search result button resource drawable.

      • setPrevIcon

         void setPrevIcon(@DrawableRes() int prevIcon)

        Sets previous search result button icon.

        Parameters:
        prevIcon - Previous search result button resource drawable.
      • getNextIcon

        @DrawableRes() int getNextIcon()

        Returns next search result button icon.

        Returns:

        Next search result button resource drawable.

      • setNextIcon

         void setNextIcon(@DrawableRes() int nextIcon)

        Sets next search result button icon.

        Parameters:
        nextIcon - Next search result button resource drawable.
      • isDisplayed

         boolean isDisplayed()

        Called when the activity needs to know the visibility of this view. Returns true if this view is visible, otherwise returns false.

      • 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.

      • getTextColor

        @ColorInt() int getTextColor()

        Returns text color for the inline search text input field.

        Returns:

        Input field text color.

      • setTextColor

         void setTextColor(@ColorInt() int textColor)

        Sets text color for the inline search text input field.

        Parameters:
        textColor - Input field text color.
      • getHintTextColor

        @ColorInt() int getHintTextColor()

        Returns hint text color for the inline search text input field.

        Returns:

        Input field hint text color.

      • setHintTextColor

         void setHintTextColor(@ColorInt() int hintTextColor)

        Sets hint text color for the inline search text input field.

        Parameters:
        hintTextColor - Input field hint text color.
      • getNavigationTextColor

        @ColorInt() int getNavigationTextColor()

        Returns the text color for the navigation text (that states the current displayed result).

        Returns:

        Text color for the navigation text.

      • setNavigationTextColor

         void setNavigationTextColor(@ColorInt() int navigationTextColor)

        Sets the text color for the navigation text (that states the current displayed result).

        Parameters:
        navigationTextColor - Text color for the navigation text.
      • show

         void show()

        Shows the view in the parent.

      • hide

         void hide()

        Hides the view in the parent.