public class BezierBackConsumer extends SwipeConsumer
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
mArrowColor |
protected int |
mArrowSize |
protected boolean |
mCenter |
protected int |
mColor |
protected android.graphics.Rect |
mDrawRect |
protected float |
mLastThickness |
protected android.graphics.Paint |
mPaint |
protected android.graphics.Paint |
mPaintArrow |
protected android.graphics.Path |
mPath |
protected android.graphics.Path |
mPathArrow |
protected android.graphics.PointF |
mPathControl |
protected android.graphics.PointF |
mPathControl1 |
protected android.graphics.PointF |
mPathControl2 |
protected android.graphics.PointF |
mPathControl3 |
protected android.graphics.PointF |
mPathControl4 |
protected android.graphics.PointF |
mPathEnd |
protected android.graphics.PointF |
mPathStart |
protected int |
mSize |
protected float |
mThickness |
DEFAULT_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| 构造器和说明 |
|---|
BezierBackConsumer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
dispatchDraw(android.graphics.Canvas canvas)
Called when Wrapper#dispatchDraw(Canvas) called
|
protected void |
drawArrow(android.graphics.Canvas canvas,
android.graphics.Paint paint,
float curThickness,
float percent)
draw an arrow by default, subclass can draw anything else
|
int |
getArrowColor() |
int |
getColor() |
protected int |
getSize() |
boolean |
isCenter() |
void |
onAttachToWrapper(SmartSwipeWrapper wrapper,
SwipeHelper swipeHelper)
Called when SwipeConsumer add to Wrapper
|
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)
|
void |
onSwipeAccepted(int activePointerId,
boolean settling,
float initialMotionX,
float initialMotionY) |
BezierBackConsumer |
setArrowColor(int color) |
BezierBackConsumer |
setCenter(boolean center) |
BezierBackConsumer |
setColor(int color) |
BezierBackConsumer |
setSize(int size) |
addConsumer, addListener, addToExclusiveGroup, as, calSwipeDirection, canChildScroll, clampDistanceHorizontal, clampDistanceVertical, close, close, disableAllDirections, disableBottom, disableDirection, disableHorizontal, disableLeft, disableRight, disableTop, disableVertical, 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, getOpenDistance, getOverSwipeFactor, getProgress, getReleaseMode, getSensitivity, getSwipeDistanceCalculator, getSwipeHelper, getSwipeOpenDistance, getTag, getVerticalRange, getWidth, getWrapper, initChildrenFormXml, 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, notifySwipeProgress, notifySwipeRelease, notifySwipeStart, notifySwipeStateChanged, onClosed, onDetachFromWrapper, onDraw, onLayout, onMeasure, onOpened, onStateChanged, onSwipeDistanceChanged, onSwipeReleased, open, removeAllListeners, removeListener, reset, setBottomOpen, setCurrentStateAsClosed, 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, tryAcceptMoving, tryAcceptSettling, unlockAllDirections, unlockBottom, unlockDirection, unlockHorizontal, unlockLeft, unlockRight, unlockTop, unlockVerticalprotected float mThickness
protected float mLastThickness
protected final android.graphics.Paint mPaint
protected final android.graphics.Path mPath
protected final android.graphics.PointF mPathStart
protected final android.graphics.PointF mPathControl1
protected final android.graphics.PointF mPathControl2
protected final android.graphics.PointF mPathControl
protected final android.graphics.PointF mPathControl3
protected final android.graphics.PointF mPathControl4
protected final android.graphics.PointF mPathEnd
protected final android.graphics.Paint mPaintArrow
protected final android.graphics.Path mPathArrow
protected android.graphics.Rect mDrawRect
protected int mArrowSize
protected int mSize
protected int mColor
protected int mArrowColor
protected boolean mCenter
public void onAttachToWrapper(SmartSwipeWrapper wrapper, SwipeHelper swipeHelper)
SwipeConsumeronAttachToWrapper 在类中 SwipeConsumerwrapper - Wrapper to add toswipeHelper - SwipeHelper bind to this SwipeConsumerpublic void onSwipeAccepted(int activePointerId,
boolean settling,
float initialMotionX,
float initialMotionY)
onSwipeAccepted 在类中 SwipeConsumerpublic void onDisplayDistanceChanged(int distanceXToDisplay,
int distanceYToDisplay,
int dx,
int dy)
SwipeConsumeronDisplayDistanceChanged 在类中 SwipeConsumerdistanceXToDisplay - 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 callSwipeDistanceCalculatorpublic void dispatchDraw(android.graphics.Canvas canvas)
SwipeConsumerdispatchDraw 在类中 SwipeConsumercanvas - canvasprotected void drawArrow(android.graphics.Canvas canvas,
android.graphics.Paint paint,
float curThickness,
float percent)
canvas - canvaspaint - PaintcurThickness - current thickness of BezierBackConsumerpercent - percent of full swipepublic BezierBackConsumer setSize(int size)
protected int getSize()
public int getColor()
public BezierBackConsumer setColor(int color)
public int getArrowColor()
public BezierBackConsumer setArrowColor(int color)
public boolean isCenter()
public BezierBackConsumer setCenter(boolean center)