public class SlidingConsumer extends DrawerConsumer
| 限定符和类型 | 字段和说明 |
|---|---|
static float |
FACTOR_COVER
contentView moves above the drawer view, drawer view show below contentView
|
static float |
FACTOR_FOLLOW
Default factor, contentView moves and drawer view followed pixel by pixel
|
protected boolean |
mDrawerExpandable |
protected int |
mDrawerH |
protected int |
mDrawerW |
protected boolean |
mEdgeAffinity |
protected float |
mRelativeMoveFactor |
b, 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| 构造器和说明 |
|---|
SlidingConsumer() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
calculateDrawerDirectionInitPosition(int direction,
int w,
int h) |
float |
getRelativeMoveFactor() |
boolean |
isDrawerExpandable() |
boolean |
isEdgeAffinity() |
protected void |
layoutContentView(android.view.View contentView) |
protected void |
layoutDrawerView() |
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 |
orderChildren() |
SlidingConsumer |
setDrawerExpandable(boolean expandable)
determine whether drawers expandable.
|
SlidingConsumer |
setEdgeAffinity(boolean affinity)
set drawer is affinity to the edge or not
this property make effect when
mDrawerExpandable is false and SwipeConsumer.mSwipeMaxDistance is bigger than drawerView`s size(width or height). |
SlidingConsumer |
setRelativeMoveFactor(float factor)
Set the movement factor of drawer view relative to content view
|
canChildScroll, changeDrawerViewVisibility, getDrawerView, getOpenDistance, getShadowSize, initChildrenFormXml, initScrimView, isDrawerViewRequired, isScrimAndShadowOutsideContentView, layoutChildren, layoutScrimView, notifySwipeProgress, notifySwipeRelease, notifySwipeStart, onAttachToWrapper, onClick, onClosed, onLayout, onOpened, onSwipeAccepted, setAllDirectionDrawerView, setBottomDrawerView, setCurrentStateAsClosed, setDrawerView, setDrawerViewRequired, setHorizontalDrawerView, setLeftDrawerView, setRightDrawerView, setScrimColor, setShadowColor, setShadowSize, setTopDrawerView, setVerticalDrawerView, showScrimAndShadowInsideContentView, showScrimAndShadowOutsideContentView, tryAcceptMovingaddConsumer, addListener, addToExclusiveGroup, as, calSwipeDirection, clampDistanceHorizontal, clampDistanceVertical, 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, setOverSwipeFactor, setReleaseMode, setRightOpen, setSensitivity, setSwipeDistanceCalculator, setTag, setTopOpen, setWidth, slideTo, smoothBottomOpen, smoothClose, smoothLeftOpen, smoothOpenOrClose, smoothRightOpen, smoothSlideTo, smoothSlideTo, smoothSlideTo, smoothTopOpen, tryAcceptSettling, unlockAllDirections, unlockBottom, unlockDirection, unlockHorizontal, unlockLeft, unlockRight, unlockTop, unlockVerticalpublic static final float FACTOR_COVER
public static final float FACTOR_FOLLOW
protected float mRelativeMoveFactor
protected boolean mEdgeAffinity
protected boolean mDrawerExpandable
protected int mDrawerW
protected int mDrawerH
public void onDetachFromWrapper()
SwipeConsumeronDetachFromWrapper 在类中 DrawerConsumerprotected void calculateDrawerDirectionInitPosition(int direction,
int w,
int h)
protected void onDisplayDistanceChanged(int distanceXToDisplay,
int distanceYToDisplay,
int dx,
int dy)
SwipeConsumeronDisplayDistanceChanged 在类中 DrawerConsumerdistanceXToDisplay - 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 orderChildren()
orderChildren 在类中 DrawerConsumerprotected void layoutContentView(android.view.View contentView)
layoutContentView 在类中 DrawerConsumerprotected void layoutDrawerView()
layoutDrawerView 在类中 DrawerConsumerpublic float getRelativeMoveFactor()
public SlidingConsumer setRelativeMoveFactor(float factor)
factor - Multiplier of mCurDrawerView relative movement to mWrapper.getContentView().
this value must to be between 0F and 1F.
0: drawer view not move
0~1:
1: drawer view followed contentView pixel by pixelpublic boolean isEdgeAffinity()
public SlidingConsumer setEdgeAffinity(boolean affinity)
this property make effect whenif set true, drawer view adsorbs tomDrawerExpandableis false andSwipeConsumer.mSwipeMaxDistanceis bigger than drawerView`s size(width or height). it may be cause by: 1.SwipeConsumer.mSwipeOpenDistanceis bigger than drawerView`s size viaSwipeConsumer.setOpenDistance(int)2.SwipeConsumer.mOverSwipeFactoris bigger than 0F viaSwipeConsumer.setOverSwipeFactor(float)
SmartSwipeWrapper`s edgeaffinity - adsorbs to edge or notSwipeConsumer.setOpenDistance(int),
SwipeConsumer.setOverSwipeFactor(float),
setDrawerExpandable(boolean)public boolean isDrawerExpandable()
public SlidingConsumer setDrawerExpandable(boolean expandable)
this property make effect whenif set true,SwipeConsumer.mSwipeMaxDistanceis bigger than drawerView`s size(width or height). it may be cause by: 1.SwipeConsumer.mSwipeOpenDistanceis bigger than drawerView`s size viaSwipeConsumer.setOpenDistance(int)2.SwipeConsumer.mOverSwipeFactoris bigger than 0F viaSwipeConsumer.setOverSwipeFactor(float)
setEdgeAffinity(boolean) will be ignored.expandable - expandable or notsetEdgeAffinity(boolean),
SwipeConsumer.setOverSwipeFactor(float)