public abstract class DraggableSwipeBack extends SwipeBack
SwipeBack.OnInterceptMoveEventListener, SwipeBack.OnStateChangeListener, SwipeBack.Typeandroid.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.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| Modifier and Type | Field and Description |
|---|---|
protected static int |
INVALID_POINTER |
protected int |
mActivePointerId
The current pointer id.
|
protected static int |
MAX_MENU_OVERLAY_ALPHA
The maximum alpha of the dark menu overlay used for dimming the menu.
|
protected int |
mCloseEnough
Distance in px from closed position from where the drawer is considered closed with regards to touch events.
|
protected float |
mInitialMotionX
The initial X position of a drag.
|
protected float |
mInitialMotionY
The initial Y position of a drag.
|
protected boolean |
mIsDragging
Indicates whether the drawer is currently being dragged.
|
protected float |
mLastMotionX
The last X position of a drag.
|
protected float |
mLastMotionY
The last Y position of a drag.
|
protected boolean |
mLayerTypeHardware
Indicates whether the current layer type is
View.LAYER_TYPE_HARDWARE. |
protected int |
mMaxVelocity
Maximum velocity allowed when animating the drawer open/closed.
|
protected boolean |
mOffsetMenu
Indicates whether the menu should be offset when dragging the drawer.
|
protected long |
mPeekDelay
Default delay between each subsequent animation, after
peekSwipeBack() has been called. |
protected java.lang.Runnable |
mPeekRunnable
Runnable used when the peek animation is running.
|
protected com.hannesdorfmann.swipeback.Scroller |
mPeekScroller
Scroller used for the peek drawer animation.
|
protected int |
mTouchSlop
Slop before starting a drag.
|
protected android.view.VelocityTracker |
mVelocityTracker
Velocity tracker used when animating the drawer open/closed after a drag.
|
protected static int |
PEEK_DURATION
The duration of the peek animation.
|
ANIMATION_DELAY, DRAG_CONTENT, DRAG_WINDOW, mActivePosition, mActiveRect, mActiveView, mContentContainer, mDividerAsShadowColor, mDividerDrawable, mDividerEnabled, mDividerRect, mDividerSize, mDrawerState, mDrawOverlay, mHardwareLayersEnabled, mIsStatic, mMaxAnimationDuration, mOffsetPixels, mOnInterceptMoveEventListener, mPreviousTouchMode, mSwipeBackContainer, mSwipeBackOverlay, mSwipeBackTransformer, mSwipeBackViewSize, mSwipeBackViewVisible, mTouchBezelSize, mTouchMode, mTouchSize, SMOOTH_INTERPOLATOR, STATE_CLOSED, STATE_CLOSING, STATE_DRAGGING, STATE_OPEN, STATE_OPENING, TOUCH_MODE_BEZEL, TOUCH_MODE_FULLSCREEN, TOUCH_MODE_NONECLIP_TO_PADDING_MASK, FOCUS_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, 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 |
|---|
DraggableSwipeBack(android.content.Context context) |
DraggableSwipeBack(android.content.Context context,
android.util.AttributeSet attrs) |
DraggableSwipeBack(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
animateOffsetTo(int position,
int duration) |
protected void |
animateOffsetTo(int position,
int velocity,
boolean animate)
Moves the drawer to the position passed.
|
protected void |
cancelContentTouch() |
protected boolean |
canChildrenScroll(int dx,
int dy,
int x,
int y) |
protected boolean |
canChildScrollHorizontally(android.view.View v,
boolean checkV,
int dx,
int x,
int y)
Tests scrollability within child views of v given a delta of dx.
|
protected boolean |
canChildScrollVertically(android.view.View v,
boolean checkV,
int dx,
int x,
int y)
Tests scrollability within child views of v given a delta of dx.
|
protected void |
endDrag()
Called when a drag has been ended.
|
protected void |
endPeek()
Stops ongoing peek drawer animation.
|
boolean |
getOffsetSwipeBackEnabled()
Indicates whether the swipe back is being offset when dragging the
drawer.
|
int |
getTouchBezelSize()
Returns the size of the touch bezel in px.
|
int |
getTouchMode()
Returns the touch mode.
|
protected float |
getXVelocity(android.view.VelocityTracker velocityTracker) |
protected float |
getYVelocity(android.view.VelocityTracker velocityTracker) |
protected void |
init(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle) |
protected abstract void |
initPeekScroller() |
protected boolean |
isCloseEnough() |
boolean |
isVisible()
Indicates whether the swipe back is currently visible.
|
SwipeBack |
peekSwipeBack()
Animates the swipe back view slightly open until the user opens it completely.
|
SwipeBack |
peekSwipeBack(long delay)
Animates the swipe back view slightly open.
|
SwipeBack |
peekSwipeBack(long startDelay,
long delay)
Animates the swipe back view slightly open.
|
protected float |
safeGetX(android.view.MotionEvent ev) |
protected float |
safeGetY(android.view.MotionEvent ev) |
SwipeBack |
setHardwareLayerEnabled(boolean enabled)
Enables or disables the user of
View.LAYER_TYPE_HARDWARE when animations views. |
void |
setOffsetSwipeBackViewEnabled(boolean offsetMenu)
Enables or disables offsetting the swipe back when dragging the drawer.
|
SwipeBack |
setSize(int size)
Set the size of the swipe back when open.
|
SwipeBack |
setTouchBezelSize(int size)
Sets the size of the touch bezel.
|
SwipeBack |
setTouchMode(int mode)
Sets the drawer touch mode.
|
protected void |
startLayerTranslation()
If possible, set the layer type to
View.LAYER_TYPE_HARDWARE. |
protected void |
startPeek()
Starts peek drawer animation.
|
protected void |
stopAnimation()
Stops ongoing animation of the drawer.
|
protected void |
stopLayerTranslation()
If the current layer type is
View.LAYER_TYPE_HARDWARE, this will set it to
View.LAYER_TYPE_NONE. |
SwipeBack |
toggle(boolean animate)
Toggles the swipe back open and close.
|
attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, close, close, disable, dispatchDraw, dispatchOnDrawerSlide, dpToPx, drawOverlay, fitSystemWindows, getContentContainer, getDivider, getDividerOrientation, getDrawOverlay, getPosition, getSize, getState, getSwipeBackContainer, getSwipeBackTransformer, getSwipeBackView, isActivitiyDestroyed, isViewDescendant, logDrawerState, onAttachedToWindow, onDetachedFromWindow, onFinishInflate, onOffsetPixelsChanged, onRtlPropertiesChanged, open, open, postOnAnimation, setContentView, setContentView, setContentView, setDivider, setDivider, setDividerAsShadowColor, setDividerAsSolidColor, setDividerEnabled, setDividerSize, setDividerSizeInPixel, setDrawerState, setDrawOverlay, setMaxAnimationDuration, setOffsetPixels, setOnInterceptMoveEventListener, setOnStateChangeListener, setSwipeBackContainerBackgroundColor, setSwipeBackContainerBackgroundDrawable, setSwipeBackContainerBackgroundDrawable, setSwipeBackTransformer, setSwipeBackView, setSwipeBackView, setSwipeBackView, setTouchEnabled, toggle, updateDividerRect, updateTouchAreaSizeaddChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, checkLayoutParams, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onLayout, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayoutaddFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, 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, 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, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, 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, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onMeasure, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, 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, setOnClickListener, 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, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDrawclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayoutprotected static final int MAX_MENU_OVERLAY_ALPHA
protected static final int PEEK_DURATION
protected static final int INVALID_POINTER
protected int mTouchSlop
protected final java.lang.Runnable mPeekRunnable
protected boolean mIsDragging
protected int mActivePointerId
protected float mInitialMotionX
protected float mInitialMotionY
protected float mLastMotionX
protected float mLastMotionY
protected long mPeekDelay
peekSwipeBack() has been called.protected com.hannesdorfmann.swipeback.Scroller mPeekScroller
protected android.view.VelocityTracker mVelocityTracker
protected int mMaxVelocity
protected boolean mOffsetMenu
protected int mCloseEnough
protected boolean mLayerTypeHardware
View.LAYER_TYPE_HARDWARE.public DraggableSwipeBack(android.content.Context context)
public DraggableSwipeBack(android.content.Context context,
android.util.AttributeSet attrs)
public DraggableSwipeBack(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
protected void init(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
public SwipeBack toggle(boolean animate)
SwipeBackpublic boolean isVisible()
SwipeBackpublic SwipeBack setSize(int size)
SwipeBackpublic void setOffsetSwipeBackViewEnabled(boolean offsetMenu)
SwipeBacksetOffsetSwipeBackViewEnabled in class SwipeBackoffsetMenu - True to offset the swipe back, false otherwise.public boolean getOffsetSwipeBackEnabled()
SwipeBackgetOffsetSwipeBackEnabled in class SwipeBackpublic SwipeBack peekSwipeBack()
SwipeBackpeekSwipeBack in class SwipeBackpublic SwipeBack peekSwipeBack(long delay)
SwipeBackpeekSwipeBack in class SwipeBackdelay - The delay (in milliseconds) between each run of the animation. If 0, this animation is only run
once.public SwipeBack peekSwipeBack(long startDelay, long delay)
SwipeBackpeekSwipeBack in class SwipeBackstartDelay - The delay (in milliseconds) until the animation is first run.delay - The delay (in milliseconds) between each run of the animation. If 0, this animation is only run
once.public SwipeBack setHardwareLayerEnabled(boolean enabled)
SwipeBackView.LAYER_TYPE_HARDWARE when animations views.setHardwareLayerEnabled in class SwipeBackenabled - Whether hardware layers are enabled.public int getTouchMode()
SwipeBackgetTouchMode in class SwipeBackpublic SwipeBack setTouchMode(int mode)
SwipeBackSwipeBack.TOUCH_MODE_NONE, SwipeBack.TOUCH_MODE_BEZEL or
SwipeBack.TOUCH_MODE_FULLSCREEN.setTouchMode in class SwipeBackmode - The touch mode.public SwipeBack setTouchBezelSize(int size)
SwipeBacksetTouchBezelSize in class SwipeBacksize - The touch bezel size in px.public int getTouchBezelSize()
SwipeBackgetTouchBezelSize in class SwipeBackprotected void startLayerTranslation()
View.LAYER_TYPE_HARDWARE.protected void stopLayerTranslation()
View.LAYER_TYPE_HARDWARE, this will set it to
View.LAYER_TYPE_NONE.protected void endDrag()
protected void stopAnimation()
protected void cancelContentTouch()
protected void animateOffsetTo(int position,
int velocity,
boolean animate)
position - The position the content is moved to.velocity - Optional velocity if called by releasing a drag event.animate - Whether the move is animated.protected void animateOffsetTo(int position,
int duration)
protected void startPeek()
protected abstract void initPeekScroller()
protected void endPeek()
protected boolean isCloseEnough()
protected boolean canChildrenScroll(int dx,
int dy,
int x,
int y)
protected boolean canChildScrollHorizontally(android.view.View v,
boolean checkV,
int dx,
int x,
int y)
v - View to test for horizontal scrollabilitycheckV - Whether the view should be checked for draggabilitydx - Delta scrolled in pixelsx - X coordinate of the active touch pointy - Y coordinate of the active touch pointprotected boolean canChildScrollVertically(android.view.View v,
boolean checkV,
int dx,
int x,
int y)
v - View to test for horizontal scrollabilitycheckV - Whether the view should be checked for draggabilitydx - Delta scrolled in pixelsx - X coordinate of the active touch pointy - Y coordinate of the active touch pointprotected float getXVelocity(android.view.VelocityTracker velocityTracker)
protected float getYVelocity(android.view.VelocityTracker velocityTracker)
protected float safeGetX(android.view.MotionEvent ev)
protected float safeGetY(android.view.MotionEvent ev)