public class DefaultSlideTouchDispatcher extends java.lang.Object implements ISlideTouchEventDispatcher
| Modifier and Type | Field and Description |
|---|---|
protected SlideCallBack |
mCallBack |
protected float |
mDownX
按下的X轴坐标
|
protected boolean |
mIsSideSlideLeft
是否从左边边缘开始滑动
|
protected boolean |
mIsSideSlideRight
是否从右边边缘开始滑动
|
protected float |
mMoveXLength
位移的X轴距离
|
protected OnSlideUpdateListener |
mOnSlideUpdateListener |
protected SlideInfo |
mSlideInfo |
| Constructor and Description |
|---|
DefaultSlideTouchDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
ISlideTouchEventDispatcher |
init(SlideInfo slideInfo,
SlideCallBack callBack,
OnSlideUpdateListener listener)
初始化接口
|
boolean |
onTouch(android.view.View v,
android.view.MotionEvent event) |
void |
updateSlideLength(boolean isLeft,
float length)
更新侧滑长度
|
void |
updateSlidePosition(boolean isLeft,
int position)
更新侧滑位置
|
protected boolean mIsSideSlideLeft
protected boolean mIsSideSlideRight
protected float mDownX
protected float mMoveXLength
protected SlideInfo mSlideInfo
protected SlideCallBack mCallBack
protected OnSlideUpdateListener mOnSlideUpdateListener
public ISlideTouchEventDispatcher init(SlideInfo slideInfo, SlideCallBack callBack, OnSlideUpdateListener listener)
init in interface ISlideTouchEventDispatcherslideInfo - 侧滑信息callBack - 侧滑事件回调listener - 侧滑更新监听public boolean onTouch(android.view.View v,
android.view.MotionEvent event)
onTouch in interface android.view.View.OnTouchListenerpublic void updateSlideLength(boolean isLeft,
float length)
updateSlideLength in interface ISlideTouchEventDispatcherisLeft - length - public void updateSlidePosition(boolean isLeft,
int position)
updateSlidePosition in interface ISlideTouchEventDispatcherisLeft - position -