public class ReaderView extends android.view.ViewGroup implements CustomScaleGesture.OnScaleGestureListener, android.view.GestureDetector.OnGestureListener, KeyboardInputListener, android.view.View.OnKeyListener
android.view.ViewGroup.LayoutParams, android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListenerandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnCapturedPointerListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener, android.view.View.OnUnhandledKeyEventListenerFOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHEACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH, AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR, AUTOFILL_HINT_CREDIT_CARD_NUMBER, AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE, AUTOFILL_HINT_EMAIL_ADDRESS, AUTOFILL_HINT_NAME, AUTOFILL_HINT_PASSWORD, AUTOFILL_HINT_PHONE, AUTOFILL_HINT_POSTAL_ADDRESS, AUTOFILL_HINT_POSTAL_CODE, AUTOFILL_HINT_USERNAME, AUTOFILL_TYPE_DATE, AUTOFILL_TYPE_LIST, AUTOFILL_TYPE_NONE, AUTOFILL_TYPE_TEXT, AUTOFILL_TYPE_TOGGLE, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, IMPORTANT_FOR_AUTOFILL_AUTO, IMPORTANT_FOR_AUTOFILL_NO, IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_AUTOFILL_YES, IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_AUTO, IMPORTANT_FOR_CONTENT_CAPTURE_NO, IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS, IMPORTANT_FOR_CONTENT_CAPTURE_YES, IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_CAPTURE_HINT_AUTO, SCROLL_CAPTURE_HINT_EXCLUDE, SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS, SCROLL_CAPTURE_HINT_INCLUDE, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VISIBLE, X, Y, Z| Constructor and Description |
|---|
ReaderView(android.content.Context context) |
ReaderView(android.content.Context context,
android.util.AttributeSet attrs) |
ReaderView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelJob(com.compdfkit.ui.utils.CPDFWorker.Job job) |
void |
computeScroll() |
void |
equeueJob(com.compdfkit.ui.utils.CPDFWorker.Job job) |
int |
getAddImagePage()
Get the adding image page.
|
android.graphics.PointF |
getAddImagePoint()
Get the adding image point.
|
android.view.View |
getChild(int pageNum)
Get the PageView of page
pageNum |
float |
getContentHeight()
Gets the actual height of the reader on screen.
|
float |
getContentWidth()
Gets the actual width of the reader on screen.
|
android.view.inputmethod.InputConnection |
getInputConnection() |
int |
getPageCount()
Gets the total count of document pages.
|
android.graphics.RectF |
getPageNoZoomSize(int pageNum)
Gets the original page size in
pageNum, which means convert the size from PDF page to Android coordinate system. |
int |
getPageNum()
Gets the current page index.
|
android.graphics.RectF |
getPageSize(int pageNum)
Gets page size in
pageNum page. |
CPDFDocument |
getPDFDocument()
Gets document entity, more:
CPDFDocument |
float |
getPDFScale(int pageNum)
Gets the scale in index page.
|
int |
getReadBackgroundColor()
Gets background color of reader
|
float |
getScale()
Get the page scale.
|
float |
getScaleMax()
Get max scale value of the page.
|
float |
getScaleMin()
Get min scale value of the page.
|
OnSelectEditAreaChangeListener |
getSelectEditAreaChangeListener()
Get the listener that listens to the change of the selected edit area.
|
void |
invalidateAllChildren()
Invalidates content of all pages
|
void |
invalidateChild(int childIndex)
Invalidates the whole content of index page.
|
void |
invalidateChildAp(int childIndex)
Invalidates appearance in index page.
|
void |
invalidateChildrenAp()
Invalidates appearance in all pages
|
boolean |
isContinueMode()
Whether it is continuous scroll mode.
|
boolean |
isCoverPageMode()
Whether it is cover page mode.
|
boolean |
isCropMode()
Whether it is crop mode.
|
boolean |
isDoublePageMode()
Whether it is double page mode.
|
boolean |
isPageInScreen(int pageIndex)
Whether the index page displays on the screen.
|
boolean |
isVerticalMode()
Whether it is vertical scroll mode.
|
boolean |
onCheckIsTextEditor() |
android.view.inputmethod.InputConnection |
onCreateInputConnection(android.view.inputmethod.EditorInfo outAttrs) |
boolean |
onDown(android.view.MotionEvent e) |
void |
onDragEnd() |
void |
onDragging() |
void |
onFling() |
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY) |
void |
onFlingEnd() |
boolean |
onInterceptTouchEvent(android.view.MotionEvent ev) |
void |
onJumpEnd() |
void |
onJumping() |
boolean |
onKey(android.view.View v,
int keyCode,
android.view.KeyEvent event) |
void |
onKeyboardComposingText(java.lang.CharSequence text) |
void |
onKeyboardDelete() |
void |
onKeyboardDown() |
void |
onKeyboardLeft() |
void |
onKeyboardRight() |
void |
onKeyboardSection() |
void |
onKeyboardTextInput(java.lang.CharSequence text,
java.lang.CharSequence composeText) |
void |
onKeyboardUp() |
void |
onLongPress(android.view.MotionEvent e) |
void |
onNoScroll() |
boolean |
onScale(CustomScaleGesture detector) |
boolean |
onScaleBegin(CustomScaleGesture detector)
Responds to the beginning of a scaling gesture.
|
void |
onScaleEnd(CustomScaleGesture detector)
Responds to the end of a scale gesture.
|
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY) |
void |
onShowPress(android.view.MotionEvent e) |
boolean |
onSingleTapUp(android.view.MotionEvent e) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
void |
onViewRemoved(android.view.View child) |
void |
pauseAllRenderProcess()
Suspend all rendering processes.
|
void |
reloadPages()
Reloads all pages
|
void |
reloadPages(java.util.List<java.lang.Integer> updateHQApPageList) |
void |
removeHQApListIndex(int pageNum) |
void |
setAddImagePage(int page)
Set the adding image page.
|
void |
setAddImagePoint(android.graphics.PointF point)
Set the adding image point.
|
void |
setCanScale(boolean canScale)
Whether allow to scale.
|
void |
setContinueMode(boolean continueMode)
Sets whether it is continuous scroll mode.
|
void |
setCoverPageMode(boolean coverPageMode)
Sets whether it is cover page mode.
|
void |
setCropMode(boolean cropMode)
Sets whether it is crop mode.
|
void |
setDisplayPageIndex(int pageIndex)
Jump to the index page, this method will record the page index before to destination page by default, and call
IReaderViewCallback::onRecordLastJumpPageNum(int) method |
void |
setDisplayPageIndex(int pageIndex,
boolean isRecordLastJumpPageNum)
Jump to the index page.
|
void |
setDisplayPageIndex(int pageIndex,
boolean isRecordLastJumpPageNum,
android.graphics.Point point)
Jump to the index page.
|
void |
setDisplayPageIndex(int pageIndex,
android.graphics.Point point)
Jump to the index page and move a distance in the x and y directions respectively.
|
void |
setDocumentStatusCallback(IDocumentStatusCallback iDocumentStatusCallback)
Registers a callback to be invoked when document status is changed.
|
void |
setDoublePageMode(boolean doublePageMode)
Sets whether it is double page mode.
|
void |
setEditAreaMoving(boolean moving) |
void |
setMinScaleEnable(boolean isMinScaleEnable)
Whether to support minimum scaling to half the screen size
|
void |
setPDFDocument(CPDFDocument tpdfDocument)
Sets document entity.
|
void |
setReadBackgroundColor(int color)
Sets background color of reader.
|
void |
setReaderViewCallback(IReaderViewCallback iReaderViewCallback)
Registers a callback to be invoked when this reader view is operated.
|
void |
setScale(float scale)
Set the page scale
|
void |
setSelectEditAreaChangeListener(OnSelectEditAreaChangeListener listener)
Set the listener to listener to the change of the selected edit area.
|
void |
setVerticalMode(boolean verticalMode)
Sets whether it is vertical scroll mode.
|
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onInterceptHoverEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, shouldDelayChildPressedState, showContextMenuForChild, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayoutaddFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, autofill, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearViewTranslationCallback, combineMeasuredStates, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, focusSearch, forceHasOverlappingRendering, forceLayout, generateDisplayHash, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getReceiveContentMimeTypes, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchables, getTouchDelegate, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRtlPropertiesChanged, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAlpha, setAnimation, setAnimationMatrix, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRenderEffect, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDrawequals, getClass, hashCode, notify, notifyAll, wait, wait, waitcanResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch, requestFitSystemWindows, requestLayoutpublic ReaderView(android.content.Context context)
public ReaderView(android.content.Context context,
android.util.AttributeSet attrs)
public ReaderView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
public void setEditAreaMoving(boolean moving)
public void equeueJob(com.compdfkit.ui.utils.CPDFWorker.Job job)
public void cancelJob(com.compdfkit.ui.utils.CPDFWorker.Job job)
public void setSelectEditAreaChangeListener(OnSelectEditAreaChangeListener listener)
listener - The listener.public OnSelectEditAreaChangeListener getSelectEditAreaChangeListener()
public void setReadBackgroundColor(int color)
color - Background color.public void setReaderViewCallback(IReaderViewCallback iReaderViewCallback)
iReaderViewCallback - Callback interface entity related to the reader view operationpublic void setDocumentStatusCallback(IDocumentStatusCallback iDocumentStatusCallback)
iDocumentStatusCallback - Callback interface entity related to the document statuspublic int getReadBackgroundColor()
public void setDisplayPageIndex(int pageIndex)
IReaderViewCallback::onRecordLastJumpPageNum(int) methodpageIndex - Page numberpublic void setDisplayPageIndex(int pageIndex,
boolean isRecordLastJumpPageNum)
pageIndex - Page index.isRecordLastJumpPageNum - Whether to record the page index before jumping to destination page.public void setDisplayPageIndex(int pageIndex,
android.graphics.Point point)
pageIndex - Page index.point - The distance to move in the x and y directions.public void setDisplayPageIndex(int pageIndex,
boolean isRecordLastJumpPageNum,
android.graphics.Point point)
pageIndex - Page index.isRecordLastJumpPageNum - Whether to record the page index before jumping to destination page.point - The distance to move in the x and y directions.public void setCanScale(boolean canScale)
canScale - public boolean isPageInScreen(int pageIndex)
pageIndex - Page index.public void invalidateChild(int childIndex)
childIndex - Page index.public void invalidateAllChildren()
public void invalidateChildAp(int childIndex)
childIndex - Page numberpublic void invalidateChildrenAp()
public float getPDFScale(int pageNum)
pageNum - Page index.public float getScale()
public float getContentWidth()
public float getContentHeight()
public int getPageCount()
public boolean isVerticalMode()
public void setVerticalMode(boolean verticalMode)
verticalMode - Whether it is vertical scroll mode.public boolean isContinueMode()
public void setContinueMode(boolean continueMode)
continueMode - Whether it is continuous scroll mode.public boolean isDoublePageMode()
public void setDoublePageMode(boolean doublePageMode)
doublePageMode - Whether it is double page mode.public boolean isCoverPageMode()
public void setCoverPageMode(boolean coverPageMode)
coverPageMode - Whether it is cover page modepublic void setPDFDocument(CPDFDocument tpdfDocument)
tpdfDocument - Document entity, more:CPDFDocumentpublic CPDFDocument getPDFDocument()
CPDFDocumentCPDFDocumentpublic boolean isCropMode()
public void setCropMode(boolean cropMode)
cropMode - Whether it is crop mode.public int getPageNum()
Whether it is strategy in current page: 1.Non double page scroll mode: The page at the center of the screen is the current page index. 2.Double page scroll mode: The left page is the current page index of the two pages where the center of the screen is located.
public android.graphics.RectF getPageSize(int pageNum)
pageNum page. The width is RectF.width(), the height is RectF.height()pageNum - Page number.public android.graphics.RectF getPageNoZoomSize(int pageNum)
pageNum, which means convert the size from PDF page to Android coordinate system. The width is RectF.width(), the height is RectF.height()pageNum - Page index.public void reloadPages()
Reloads all pages in the following situation:
1.After setting the crop mode
2.Page editing: delete page, move page, exchange page, add page
3.After reloading document, CPDFDocument.reload() or CPDFDocument.reload(String)
public void reloadPages(java.util.List<java.lang.Integer> updateHQApPageList)
public void onViewRemoved(android.view.View child)
onViewRemoved in class android.view.ViewGrouppublic android.view.View getChild(int pageNum)
pageNumpageNum - page numberpublic void pauseAllRenderProcess()
public boolean onInterceptTouchEvent(android.view.MotionEvent ev)
onInterceptTouchEvent in class android.view.ViewGrouppublic boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent in class android.view.Viewpublic void computeScroll()
computeScroll in class android.view.Viewpublic void setScale(float scale)
scale - Page scalepublic float getScaleMax()
public float getScaleMin()
public boolean onScale(CustomScaleGesture detector)
onScale in interface CustomScaleGesture.OnScaleGestureListenerpublic boolean onScaleBegin(CustomScaleGesture detector)
CustomScaleGesture.OnScaleGestureListeneronScaleBegin in interface CustomScaleGesture.OnScaleGestureListenerdetector - The detector reporting the event - use this to
retrieve extended info about event state.public void onScaleEnd(CustomScaleGesture detector)
CustomScaleGesture.OnScaleGestureListener
Once a scale has ended, ScaleGestureDetector.getFocusX()
and ScaleGestureDetector.getFocusY() will return focal point
of the pointers remaining on the screen.
onScaleEnd in interface CustomScaleGesture.OnScaleGestureListenerdetector - The detector reporting the event - use this to
retrieve extended info about event state.public void removeHQApListIndex(int pageNum)
public void onDragging()
public void onDragEnd()
public void onFling()
public void onFlingEnd()
public void onJumping()
public void onJumpEnd()
public void onNoScroll()
public boolean onDown(android.view.MotionEvent e)
onDown in interface android.view.GestureDetector.OnGestureListenerpublic void onShowPress(android.view.MotionEvent e)
onShowPress in interface android.view.GestureDetector.OnGestureListenerpublic boolean onSingleTapUp(android.view.MotionEvent e)
onSingleTapUp in interface android.view.GestureDetector.OnGestureListenerpublic boolean onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY)
onScroll in interface android.view.GestureDetector.OnGestureListenerpublic void onLongPress(android.view.MotionEvent e)
onLongPress in interface android.view.GestureDetector.OnGestureListenerpublic boolean onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY)
onFling in interface android.view.GestureDetector.OnGestureListenerpublic android.view.inputmethod.InputConnection getInputConnection()
public android.view.inputmethod.InputConnection onCreateInputConnection(android.view.inputmethod.EditorInfo outAttrs)
onCreateInputConnection in class android.view.Viewpublic boolean onKey(android.view.View v,
int keyCode,
android.view.KeyEvent event)
onKey in interface android.view.View.OnKeyListenerpublic boolean onCheckIsTextEditor()
onCheckIsTextEditor in class android.view.Viewpublic void onKeyboardComposingText(java.lang.CharSequence text)
onKeyboardComposingText in interface KeyboardInputListenerpublic void onKeyboardTextInput(java.lang.CharSequence text,
java.lang.CharSequence composeText)
onKeyboardTextInput in interface KeyboardInputListenerpublic void onKeyboardDelete()
onKeyboardDelete in interface KeyboardInputListenerpublic void onKeyboardSection()
onKeyboardSection in interface KeyboardInputListenerpublic void onKeyboardUp()
onKeyboardUp in interface KeyboardInputListenerpublic void onKeyboardDown()
onKeyboardDown in interface KeyboardInputListenerpublic void onKeyboardLeft()
onKeyboardLeft in interface KeyboardInputListenerpublic void onKeyboardRight()
onKeyboardRight in interface KeyboardInputListenerpublic void setAddImagePoint(android.graphics.PointF point)
point - The adding image point.public android.graphics.PointF getAddImagePoint()
public void setAddImagePage(int page)
page - The adding image page.public int getAddImagePage()
public void setMinScaleEnable(boolean isMinScaleEnable)
isMinScaleEnable -