public class ActivitySlidingBackConsumer extends TranslucentSlidingConsumer
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
initTranslation |
protected android.app.Activity |
mActivity |
protected ActivityTranslucentUtil |
mActivityTranslucentUtil |
protected boolean |
mHorizontalSwiping |
protected android.view.View |
mPreviousActivityContentView |
FACTOR_COVER, FACTOR_FOLLOW, mDrawerExpandable, mDrawerH, mDrawerW, mEdgeAffinity, mRelativeMoveFactorb, l, mCurDrawerView, mDrawerViewRequired, mDrawerViews, mScrimColor, mScrimView, mShadowColor, mShadowSize, mShowScrimAndShadowOutsideContentView, r, tDEFAULT_OPEN_DISTANCE_IN_DP, DIRECTION_ALL, DIRECTION_BOTTOM, DIRECTION_HORIZONTAL, DIRECTION_LEFT, DIRECTION_NONE, DIRECTION_RIGHT, DIRECTION_TOP, DIRECTION_VERTICAL, mCachedSwipeDistanceX, mCachedSwipeDistanceY, mCurDisplayDistanceX, mCurDisplayDistanceY, mCurSwipeDistanceX, mCurSwipeDistanceY, mDirection, mDisableSwipeOnSettling, mEdgeSize, mEnableNested, mHeight, mInterpolator, mListeners, mMaxSettleDuration, mOpenDistance, mOpenDistanceSpecified, mOverSwipeFactor, mProgress, mReleaseMode, mSwipeDistanceCalculator, mSwipeHelper, mSwipeMaxDistance, mSwipeOpenDistance, mSwiping, mTag, mWidth, mWrapper, PROGRESS_CLOSE, PROGRESS_OPEN, RELEASE_MODE_AUTO_CLOSE, RELEASE_MODE_AUTO_OPEN, RELEASE_MODE_AUTO_OPEN_CLOSE, RELEASE_MODE_HOLE_OPEN, RELEASE_MODE_NONE| 构造器和说明 |
|---|
ActivitySlidingBackConsumer(android.app.Activity activity) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
clampDistanceHorizontal(int distanceX,
int dx) |
int |
clampDistanceVertical(int distanceY,
int dy) |
protected void |
initChildrenFormXml()
init children via xml usage of
SmartSwipeWrapper |
protected void |
layoutContentView(android.view.View contentView) |
void |
onAttachToWrapper(SmartSwipeWrapper wrapper,
SwipeHelper swipeHelper)
Called when SwipeConsumer add to Wrapper
|
protected void |
onClosed() |
void |
onDetachFromWrapper()
Called when removed from Wrapper
|
protected void |
onDisplayDistanceChanged(int distanceXToDisplay,
int distanceYToDisplay,
int dx,
int dy)
Called to refresh UI when swipe distance is changed. final value has clamped and modified by Resistor(if it not null)
|
protected void |
onOpened() |
void |
onSwipeAccepted(int activePointerId,
boolean settling,
float initialMotionX,
float initialMotionY) |
boolean |
tryAcceptMoving(int pointerId,
float downX,
float downY,
float dx,
float dy) |
boolean |
tryAcceptSettling(int pointerId,
float downX,
float downY)
always swipe by default when settling
|
changeDrawerViewVisibility, getDrawerView, layoutDrawerView, setDrawerView, setOverSwipeFactorcalculateDrawerDirectionInitPosition, getRelativeMoveFactor, isDrawerExpandable, isEdgeAffinity, orderChildren, setDrawerExpandable, setEdgeAffinity, setRelativeMoveFactorcanChildScroll, getOpenDistance, getShadowSize, initScrimView, isDrawerViewRequired, isScrimAndShadowOutsideContentView, layoutChildren, layoutScrimView, notifySwipeProgress, notifySwipeRelease, notifySwipeStart, onClick, onLayout, setAllDirectionDrawerView, setBottomDrawerView, setCurrentStateAsClosed, setDrawerViewRequired, setHorizontalDrawerView, setLeftDrawerView, setRightDrawerView, setScrimColor, setShadowColor, setShadowSize, setTopDrawerView, setVerticalDrawerView, showScrimAndShadowInsideContentView, showScrimAndShadowOutsideContentViewaddConsumer, addListener, addToExclusiveGroup, as, calSwipeDirection, close, close, disableAllDirections, disableBottom, disableDirection, disableHorizontal, disableLeft, disableRight, disableTop, disableVertical, dispatchDraw, enableAllDirections, enableBottom, enableDirection, enableDirection, enableHorizontal, enableLeft, enableNestedFlyAllDirections, enableNestedFlyBottom, enableNestedFlyHorizontal, enableNestedFlyLeft, enableNestedFlyRight, enableNestedFlyTop, enableNestedFlyVertical, enableNestedScrollAllDirections, enableNestedScrollBottom, enableNestedScrollHorizontal, enableNestedScrollLeft, enableNestedScrollRight, enableNestedScrollTop, enableNestedScrollVertical, enableRight, enableTop, enableVertical, findTopChildUnder, getDirection, getDragState, getEdgeSize, getHeight, getHorizontalRange, getInterpolator, getMaxSettleDuration, getOverSwipeFactor, getProgress, getReleaseMode, getSensitivity, getSwipeDistanceCalculator, getSwipeHelper, getSwipeOpenDistance, getTag, getVerticalRange, getWidth, getWrapper, isAllDirectionsEnable, isAllDirectionsLocked, isBottomEnable, isBottomLocked, isClosed, isDirectionEnable, isDirectionLocked, isDisableSwipeOnSetting, isHorizontalDirection, isHorizontalEnable, isHorizontalLocked, isLeftEnable, isLeftLocked, isNestedAndDisabled, isNestedFlyEnable, isNestedScrollEnable, isOpened, isRightEnable, isRightLocked, isSwiping, isTopEnable, isTopLocked, isVerticalDirection, isVerticalEnable, isVerticalLocked, isViewUnder, lockAllDirections, lockBottom, lockDirection, lockDirection, lockHorizontal, lockLeft, lockRight, lockTop, lockVertical, notifyAttachToWrapper, notifyDetachFromWrapper, notifySwipeClosed, notifySwipeOpened, notifySwipeStateChanged, onDraw, onMeasure, onStateChanged, onSwipeDistanceChanged, onSwipeReleased, open, removeAllListeners, removeListener, reset, setBottomOpen, setDisableSwipeOnSettling, setEdgeSize, setHeight, setInterpolator, setLeftOpen, setMaxSettleDuration, setOpenDistance, setReleaseMode, setRightOpen, setSensitivity, setSwipeDistanceCalculator, setTag, setTopOpen, setWidth, slideTo, smoothBottomOpen, smoothClose, smoothLeftOpen, smoothOpenOrClose, smoothRightOpen, smoothSlideTo, smoothSlideTo, smoothSlideTo, smoothTopOpen, unlockAllDirections, unlockBottom, unlockDirection, unlockHorizontal, unlockLeft, unlockRight, unlockTop, unlockVerticalprotected final ActivityTranslucentUtil mActivityTranslucentUtil
protected android.app.Activity mActivity
protected int initTranslation
protected android.view.View mPreviousActivityContentView
protected boolean mHorizontalSwiping
public ActivitySlidingBackConsumer(android.app.Activity activity)
public boolean tryAcceptMoving(int pointerId,
float downX,
float downY,
float dx,
float dy)
tryAcceptMoving 在类中 DrawerConsumerpublic boolean tryAcceptSettling(int pointerId,
float downX,
float downY)
SwipeConsumertryAcceptSettling 在类中 SwipeConsumerpointerId - pointer iddownX - motion event x for pointerIddownY - motion event y for pointerIdpublic void onAttachToWrapper(SmartSwipeWrapper wrapper, SwipeHelper swipeHelper)
SwipeConsumeronAttachToWrapper 在类中 DrawerConsumerwrapper - Wrapper to add toswipeHelper - SwipeHelper bind to this SwipeConsumerpublic void onDetachFromWrapper()
SwipeConsumeronDetachFromWrapper 在类中 SlidingConsumerprotected void onOpened()
onOpened 在类中 DrawerConsumerprotected void onClosed()
onClosed 在类中 DrawerConsumerprotected void initChildrenFormXml()
SwipeConsumerSmartSwipeWrapperpublic void onSwipeAccepted(int activePointerId,
boolean settling,
float initialMotionX,
float initialMotionY)
onSwipeAccepted 在类中 DrawerConsumerprotected void onDisplayDistanceChanged(int distanceXToDisplay,
int distanceYToDisplay,
int dx,
int dy)
SwipeConsumeronDisplayDistanceChanged 在类中 SlidingConsumerdistanceXToDisplay - distance changed in pixels along the X axis to show UIdistanceYToDisplay - distance changed in pixels along the Y axis to show UIdx - Change in X position from the last calldy - Change in Y position from the last callSwipeDistanceCalculatorprotected void layoutContentView(android.view.View contentView)
layoutContentView 在类中 SlidingConsumerpublic int clampDistanceVertical(int distanceY,
int dy)
clampDistanceVertical 在类中 SwipeConsumerpublic int clampDistanceHorizontal(int distanceX,
int dx)
clampDistanceHorizontal 在类中 SwipeConsumer