public class PosIndicator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
mEndPos
结束位置,在的onSizeChanged()中确定
|
static java.lang.String |
TAG
TAG
|
| Constructor and Description |
|---|
PosIndicator() |
| Modifier and Type | Method and Description |
|---|---|
int |
checkPosBoundary(int to)
position 边界检查,保证容器位置的可靠性。
|
int |
getCurrentPos() |
float |
getDistanceToDownX()
获取距离手指按下点的distance
|
float |
getDistanceToDownY()
获取距离手指按下点的distance
|
int |
getEndPos()
获取联动容器的终点位置.
|
android.graphics.PointF |
getFingerDownPoint()
获取手指按下点坐标
|
android.graphics.PointF |
getFingerMovePoint()
获取手指move坐标
|
android.graphics.PointF |
getFingerReleasePoint()
获取手指抬起坐标
|
int |
getLastPos() |
float |
getOffsetX()
手指Move的偏移量
|
float |
getOffsetY()
手指Move的偏移量
|
int |
getPosDistanceFromStart()
获取联动容器当前位置相对于mStartPos的距离。
|
int |
getPosOffset()
获取联动容器位置的偏移量,相对于上次移动的位置:mLastPos
|
int |
getStartPos() |
int |
getTouchAction()
获取TouchAction
|
int |
getTouchSlop()
获取touch slop
|
boolean |
hasJustBackEndPos()
当前位置刚刚到达终点位置
|
boolean |
hasJustBackStartPos()
联动容器刚刚回到StartPosition
|
boolean |
hasJustLeftEndPos()
联动容器的位置刚刚离开终点位置
|
boolean |
hasJustLeftStartPos()
联动容器刚刚离开StartPosition
|
boolean |
hasLeftEndPos()
联动容器离开EndPosition位置
|
boolean |
hasLeftStartPos()
联动容器已经离开StartPosition
|
boolean |
hasMovedAfterPressedDown()
按下后,联动容器的位置是否发生了改变
|
void |
initStartAndEndPos(int startPos,
int endPos)
初始化Layout Container 位置信息
|
boolean |
isDragging()
是否处于dragging状态
|
boolean |
isInEndPos()
联动容器是否处于结束位置
|
boolean |
isInStartPos()
联动容器是否处于起始位置
|
boolean |
isMoveDown()
手指下滑
|
boolean |
isMoveUp()
手指上滑
|
boolean |
isScrollHorizontal()
是否是水平滑动
|
boolean |
isScrollVertical()
是否是垂直滑动
|
boolean |
isUnderTouch()
手指是否touch中
|
void |
onDown(float x,
float y)
跟踪手指坐标: 按下
|
void |
onMove(float x,
float y)
跟踪手指坐标: 移动
|
void |
onPointerDown(float x,
float y) |
void |
onPointerUp(float x,
float y) |
void |
onRelease(float x,
float y)
跟踪手指坐标: 抬起
|
void |
savePosOnConfigurationChanged()
记录横竖屏切换时当前Position的比例值。用于横竖屏切换后位置信息的恢复。
|
void |
setCurrentPos(int currentPos) |
void |
setTouchSlop(int touchSlop)
设置touch slop
|
java.lang.String |
toString() |
boolean |
willOverEndPos() |
boolean |
willOverStartPos() |
public static final java.lang.String TAG
public int mEndPos
public void initStartAndEndPos(int startPos,
int endPos)
startPos - endPos - public void onDown(float x,
float y)
x - y - public void onMove(float x,
float y)
x - y - public boolean isScrollVertical()
public boolean isScrollHorizontal()
public boolean isMoveUp()
public boolean isMoveDown()
public boolean isDragging()
public void onRelease(float x,
float y)
x - y - public void onPointerDown(float x,
float y)
public void onPointerUp(float x,
float y)
public android.graphics.PointF getFingerDownPoint()
public android.graphics.PointF getFingerMovePoint()
public android.graphics.PointF getFingerReleasePoint()
public int getTouchAction()
public void setTouchSlop(int touchSlop)
touchSlop - public int getTouchSlop()
public boolean isUnderTouch()
public boolean hasMovedAfterPressedDown()
public float getOffsetX()
public float getOffsetY()
public float getDistanceToDownX()
public float getDistanceToDownY()
public boolean isInStartPos()
public boolean isInEndPos()
public boolean hasLeftStartPos()
public boolean hasJustLeftStartPos()
public boolean hasJustBackStartPos()
public boolean hasLeftEndPos()
public boolean hasJustLeftEndPos()
public boolean hasJustBackEndPos()
public int checkPosBoundary(int to)
public void setCurrentPos(int currentPos)
public int getCurrentPos()
public int getLastPos()
public boolean willOverStartPos()
public boolean willOverEndPos()
public int getStartPos()
public int getEndPos()
public int getPosDistanceFromStart()
public int getPosOffset()
public void savePosOnConfigurationChanged()
public java.lang.String toString()
toString in class java.lang.Object