public class PhotoView extends NetworkImageView implements android.view.GestureDetector.OnGestureListener, android.view.GestureDetector.OnDoubleTapListener, android.view.ScaleGestureDetector.OnScaleGestureListener, Utils.HorizontallyScrollable
android.widget.ImageView.ScaleTypeandroid.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.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.OnTouchListenermImageContainer, mImageLoader, mUrlACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, 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, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, 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_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, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, 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_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, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z| Constructor and Description |
|---|
PhotoView(android.content.Context context) |
PhotoView(android.content.Context context,
android.util.AttributeSet attrs) |
PhotoView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle) |
| Modifier and Type | Method and Description |
|---|---|
void |
bindDrawable(android.graphics.drawable.Drawable drawable) |
void |
bindPhoto(android.graphics.Bitmap photoBitmap)
Binds a bitmap to the view.
|
void |
bindResource(int resourceId) |
void |
clear()
Free all resources held by this view.
|
void |
enableAllowCrop(boolean allowCrop)
Enable or disable cropping of the displayed image.
|
void |
enableImageTransforms(boolean enable)
Enable or disable image transformations.
|
int |
getActualHeight() |
int |
getActualWidth() |
android.graphics.Bitmap |
getCroppedPhoto()
Gets a bitmap of the cropped region.
|
android.graphics.drawable.Drawable |
getDrawable()
Returns the bound drawable.
|
android.graphics.Bitmap |
getPhoto()
Returns the bound photo data if set.
|
float |
getRotationDegree()
Get Rotation of the image.
|
byte[] |
getVideoData()
Gets video data associated with this item.
|
boolean |
interceptMoveLeft(float origX,
float origY)
Return
true if the component needs to receive right-to-left
touch movements. |
boolean |
interceptMoveRight(float origX,
float origY)
Return
true if the component needs to receive left-to-right
touch movements. |
void |
invalidateDrawable(android.graphics.drawable.Drawable drawable) |
boolean |
isImageTransformsEnabled() |
boolean |
isPhotoBound()
Returns
true if a photo has been bound. |
boolean |
isVideo()
Returns
true if the photo represents a video. |
boolean |
isVideoReady()
Returns
true if the video is ready to play. |
void |
loadImageIfNecessary(boolean isInLayoutPass)
Loads the image for the view if it isn't already loaded.
|
boolean |
onDoubleTap(android.view.MotionEvent e) |
boolean |
onDoubleTapEvent(android.view.MotionEvent e) |
boolean |
onDown(android.view.MotionEvent e) |
protected void |
onDraw(android.graphics.Canvas canvas) |
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY) |
protected void |
onLayout(boolean changed,
int left,
int top,
int right,
int bottom) |
void |
onLongPress(android.view.MotionEvent e) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
boolean |
onScale(android.view.ScaleGestureDetector detector) |
boolean |
onScaleBegin(android.view.ScaleGestureDetector detector) |
void |
onScaleEnd(android.view.ScaleGestureDetector detector) |
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY) |
void |
onShowPress(android.view.MotionEvent e) |
boolean |
onSingleTapConfirmed(android.view.MotionEvent e) |
boolean |
onSingleTapUp(android.view.MotionEvent e) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
void |
resetTransformations()
Resets the image transformation to its original value.
|
void |
rotateClockwise()
Rotates the image 90 degrees, clockwise.
|
void |
rotateCounterClockwise()
Rotates the image 90 degrees, counter clockwise.
|
void |
rotateTo(float degree)
Rotates the image 90 degrees, counter clockwise.
|
void |
rotateTo(float degree,
boolean animate)
Rotates the image 90 degrees, counter clockwise.
|
protected void |
setDefaultImageOrNull() |
void |
setFixedHeight(int fixedHeight)
Forces a fixed height for this view.
|
void |
setFullScreen(boolean fullScreen,
boolean animate)
Hides the photo info portion of the header.
|
void |
setMaxInitialScale(float f) |
void |
setOnClickListener(android.view.View.OnClickListener listener) |
void |
setRotationDegree(float degree) |
boolean |
verifyDrawable(android.graphics.drawable.Drawable drawable) |
drawableStateChanged, getImageListener, onDetachedFromWindow, setDefaultImageResId, setErrorImageResId, setFadeInImage, setImageListener, setImageUrl, setMaxImageSize, setMaxImageSize, setResetImageUrlclearColorFilter, drawableHotspotChanged, getAccessibilityClassName, getAdjustViewBounds, getBaseline, getBaselineAlignBottom, getColorFilter, getCropToPadding, getImageAlpha, getImageMatrix, getImageTintList, getImageTintMode, getMaxHeight, getMaxWidth, getScaleType, hasOverlappingRendering, isOpaque, jumpDrawablesToCurrentState, onAttachedToWindow, onCreateDrawableState, onRtlPropertiesChanged, setAdjustViewBounds, setAlpha, setBaseline, setBaselineAlignBottom, setColorFilter, setColorFilter, setColorFilter, setCropToPadding, setFrame, setImageAlpha, setImageBitmap, setImageDrawable, setImageIcon, setImageLevel, setImageMatrix, setImageResource, setImageState, setImageTintList, setImageTintMode, setImageURI, setMaxHeight, setMaxWidth, setScaleType, setSelected, setVisibilityaddChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDrawpublic PhotoView(android.content.Context context)
public PhotoView(android.content.Context context,
android.util.AttributeSet attrs)
public PhotoView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent in class android.view.Viewpublic boolean onDoubleTap(android.view.MotionEvent e)
onDoubleTap in interface android.view.GestureDetector.OnDoubleTapListenerpublic boolean onDoubleTapEvent(android.view.MotionEvent e)
onDoubleTapEvent in interface android.view.GestureDetector.OnDoubleTapListenerpublic boolean onSingleTapConfirmed(android.view.MotionEvent e)
onSingleTapConfirmed in interface android.view.GestureDetector.OnDoubleTapListenerpublic boolean onSingleTapUp(android.view.MotionEvent e)
onSingleTapUp in interface android.view.GestureDetector.OnGestureListenerpublic void onLongPress(android.view.MotionEvent e)
onLongPress in interface android.view.GestureDetector.OnGestureListenerpublic void onShowPress(android.view.MotionEvent e)
onShowPress 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 boolean onDown(android.view.MotionEvent e)
onDown 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 boolean onScale(android.view.ScaleGestureDetector detector)
onScale in interface android.view.ScaleGestureDetector.OnScaleGestureListenerpublic boolean onScaleBegin(android.view.ScaleGestureDetector detector)
onScaleBegin in interface android.view.ScaleGestureDetector.OnScaleGestureListenerpublic void onScaleEnd(android.view.ScaleGestureDetector detector)
onScaleEnd in interface android.view.ScaleGestureDetector.OnScaleGestureListenerpublic void setOnClickListener(android.view.View.OnClickListener listener)
setOnClickListener in class android.view.Viewpublic boolean interceptMoveLeft(float origX,
float origY)
Utils.HorizontallyScrollabletrue if the component needs to receive right-to-left
touch movements.interceptMoveLeft in interface Utils.HorizontallyScrollableorigX - the raw x coordinate of the initial touchorigY - the raw y coordinate of the initial touchpublic boolean interceptMoveRight(float origX,
float origY)
Utils.HorizontallyScrollabletrue if the component needs to receive left-to-right
touch movements.interceptMoveRight in interface Utils.HorizontallyScrollableorigX - the raw x coordinate of the initial touchorigY - the raw y coordinate of the initial touchpublic void clear()
public void bindResource(int resourceId)
public void bindDrawable(android.graphics.drawable.Drawable drawable)
public void bindPhoto(android.graphics.Bitmap photoBitmap)
photoBitmap - the bitmap to bind.public android.graphics.Bitmap getPhoto()
null.public android.graphics.drawable.Drawable getDrawable()
null if no drawable is bound.getDrawable in class android.widget.ImageViewpublic byte[] getVideoData()
null if this is not a video.public boolean isVideo()
true if the photo represents a video. Otherwise, false.public boolean isVideoReady()
true if the video is ready to play. Otherwise, false.public boolean isPhotoBound()
true if a photo has been bound. Otherwise, false.public void setFullScreen(boolean fullScreen,
boolean animate)
public void enableAllowCrop(boolean allowCrop)
public android.graphics.Bitmap getCroppedPhoto()
null.public void resetTransformations()
public void rotateClockwise()
public void rotateCounterClockwise()
public void rotateTo(float degree)
public void rotateTo(float degree,
boolean animate)
public float getRotationDegree()
public void setRotationDegree(float degree)
protected void onDraw(android.graphics.Canvas canvas)
onDraw in class android.widget.ImageViewprotected void onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
onLayout in class NetworkImageViewprotected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
onMeasure in class android.widget.ImageViewpublic boolean verifyDrawable(android.graphics.drawable.Drawable drawable)
verifyDrawable in class android.widget.ImageViewpublic void invalidateDrawable(android.graphics.drawable.Drawable drawable)
invalidateDrawable in interface android.graphics.drawable.Drawable.CallbackinvalidateDrawable in class android.widget.ImageViewpublic void setFixedHeight(int fixedHeight)
fixedHeight - The height. If -1, use the measured height.public void enableImageTransforms(boolean enable)
public boolean isImageTransformsEnabled()
public void setMaxInitialScale(float f)
public void loadImageIfNecessary(boolean isInLayoutPass)
isInLayoutPass - True if this was invoked from a layout pass, false otherwise.protected void setDefaultImageOrNull()
setDefaultImageOrNull in class NetworkImageViewpublic int getActualHeight()
public int getActualWidth()