public class HWheel extends HGroup implements Wheel, Animator.AnimatorListener
| Modifier and Type | Field and Description |
|---|---|
protected VelocityAnimator |
mAnimator |
protected boolean |
mStoppable |
protected float |
mSwipeDelta |
protected float |
mSwipeVelocity |
ATT_SWIPE_ENABLED, mContentSize, mScrollMax, mSwipeEnabled, mSwipeMinThreshold, mSwipingATT_ALIGN, ATT_REPEATING, mAlignment, mAutoSleepChildren, mBoundsCheckEnabled, mGap, mOffsetX, mOffsetY, mRepeating, mScrollPositionATT_CACHE_ENABLED, ATT_CLIPPING_ENABLED, ATT_TOUCHABLE, mCacheDrawer, mCacheEnabled, mCacheFrameBuffer, mCachePolicy, mCacheProjection, mChildren, mChildrenDisplayOrder, mChildrenIds, mClippingEnabled, mClipStageRect, mNumChildren, mOriginalScissor, mOriginalScissorEnabled, mTouchable, mVisibleTouchables, mWrapContentHeight, mWrapContentWidthATT_ALPHA, ATT_ANIMATOR, ATT_BLEND_MODE, ATT_COLOR, ATT_DEBUG, ATT_ORIGIN_AT_CENTER, ATT_ROTATION, ATT_VISIBLE, mAlive, mAlpha, mAlphaTestEnabled, mAutoUpdateBounds, mBlendFunc, mBounds, mBypassCameraClipping, mColor, mDebugFlags, mFrameDuration, mHasTransformValues, mId, mInvalidateFlags, mManipulators, mMask, mMatrix, mNumManipulators, mOrigin, mParent, mPerspectiveEnabled, mPivot, mPosition, mRotation, mRotationVectorX, mRotationVectorY, mRotationVectorZ, mScale, mScene, mSceneSize, mSize, mSkew, mTransformMatrix, mTransformMatrixValues, mUIConstraint, mVisible, mZ, TAGDEFAULT_SNAP_ACCELERATION, DEFAULT_SNAP_DURATION, DEFAULT_SPIN_ACCELERATIONFLIP_X, FLIP_YALL, ALPHA, BLEND, BOUNDS, CACHE, CHILDREN, COLOR, DEPTH, FRAME, ORIGIN, PARENT, PARENT_BOUNDS, PERSPECTIVE, PIVOT, POSITION, ROTATION, SCALE, SIZE, SKEW, TEXTURE, TEXTURE_COORDS, TRANSFORM_MATRIX, VERTICES, VISIBILITY, VISUALCACHE_WHEN_CHILDREN_CHANGED, CACHE_WHEN_CHILDREN_STABLE| Constructor and Description |
|---|
HWheel() |
| Modifier and Type | Method and Description |
|---|---|
float |
getAcceleration() |
int |
getMaxSpinTime() |
float |
getVelocity() |
void |
onAnimationEnd(Animator animator) |
void |
onAnimationUpdate(Animator animator,
float value) |
protected void |
onTouchDown(MotionEvent event)
This is called when a touch down
|
void |
spin(float veloc) |
void |
spin(float veloc,
float acceleration) |
void |
spin(float veloc,
float acceleration,
int maxSpinTime) |
void |
spinDistance(float distance,
float acceleration,
int duration)
Spin a specified distance
|
void |
spinTo(float position,
float acceleration,
int duration)
Spin to a specific position
|
void |
spinToEnd(float acceleration,
int duration)
Spin to the End
|
void |
spinToSnap(boolean positive,
float acceleration,
int duration)
Spin to the closest child based on the specified direction which is either positive or negative
|
void |
spinToStart(float acceleration,
int duration)
Spin to the Start
|
protected void |
startSwipe() |
void |
stop() |
protected void |
stopSwipe() |
protected void |
swipe(float delta) |
drawChildren, getContentSize, getScrollMax, getSnapDelta, getStartIndex, getStartX, getSwipeMinThreshold, isSwipeEnabled, isSwiping, onAddedChild, onRemovedChild, onTouchEvent, positionChildren, scrollTo, setGap, setSize, setSwipeEnabled, setSwipeMinThreshold, setXMLAttributes, updateContentSizegetAlignment, getGap, getScrollPosition, invalidateChildrenPosition, isAutoSleepChildren, isBoundsCheckEnabled, isRepeating, scrollBy, scrollTo, setAlignment, setAutoSleepChildren, setBoundsCheckEnabled, setOffset, setRepeating, updateChildrenaddChild, addChild, clearCache, dispose, draw, getCachePolicy, getCacheProjection, getChildAt, getChildById, getChildIndex, getNumChildren, getNumGrandChildren, getObjectTree, initCache, isCacheEnabled, isChildInBounds, isClippingEnabled, isTouchable, isWrapContenHeight, isWrapContentWidth, onAddedToScene, onRemovedFromScene, removeAllChildren, removeChild, removeChild, sendChildToBottom, sendChildToTop, setCacheEnabled, setCachePolicy, setCacheProjection, setChildrenDisplayOrder, setClippingEnabled, setTouchable, setWrapContentHeight, setWrapContentWidth, swapChildren, swapChildrenaddManipulator, drawBounds, drawEnd, drawStart, drawWireframe, getAlpha, getBlendFunc, getBounds, getColor, getDebugFlags, getFps, getGlobalPosition, getHeight, getId, getInheritedBlendFunc, getInheritedColor, getManipulator, getMask, getMatrix, getNumManipulators, getOrigin, getParent, getParentMatrix, getPivot, getPosition, getRotation, getScale, getScene, getSceneSize, getSize, getSkew, getUIConstraint, getWidth, getX, getY, getZ, globalToLocal, invalidate, invalidate, isAlive, isAlphaTestEnabled, isAutoUpdateBounds, isBypassCameraClipping, isOriginAtCenter, isPerspectiveEnabled, isVisible, localToGlobal, move, moveTo, onAdded, onCreateChildren, onPreConcatParentMatrix, onRemoved, queueEvent, removeAllManipulators, removeFromParent, removeManipulator, rotate, setAlive, setAlpha, setAlphaTestEnabled, setAutoUpdateBounds, setBlendFunc, setBypassCameraClipping, setColor, setDebugFlags, setFps, setId, setMask, setOrigin, setOrigin, setOriginAtCenter, setPerspectiveEnabled, setPivot, setPivot, setPivotAtCenter, setPosition, setPosition, setRotation, setRotationVector, setScale, setScale, setSize, setSkew, setUIConstraint, setVisible, setX, setY, setZ, shouldDraw, toString, update, updateBounds, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdraw, isPerspectiveEnabled, onAdded, onCreateChildren, setPerspectiveEnabledaddManipulator, dispose, getAlpha, getBlendFunc, getBounds, getColor, getFps, getId, getInheritedBlendFunc, getInheritedColor, getManipulator, getNumManipulators, getObjectTree, getOrigin, getParent, getPivot, getScene, getSkew, getZ, globalToLocal, invalidate, invalidate, isAlive, isAutoUpdateBounds, isVisible, localToGlobal, onAddedToScene, onRemoved, onRemovedFromScene, queueEvent, removeAllManipulators, removeFromParent, removeManipulator, setAlive, setAlpha, setAutoUpdateBounds, setBlendFunc, setColor, setFps, setId, setOrigin, setOrigin, setOriginAtCenter, setPivot, setPivot, setPivotAtCenter, setSkew, setVisible, setZ, shouldDraw, update, updateBoundsgetHeight, getPosition, getRotation, getScale, getSize, getWidth, getX, getY, move, moveTo, rotate, setPosition, setPosition, setRotation, setScale, setScale, setSize, setX, setYisTouchable, setTouchablegetMatrix, getScene, getSize, globalToLocal, invalidate, invalidate, localToGlobal, queueEventprotected VelocityAnimator mAnimator
protected float mSwipeDelta
protected float mSwipeVelocity
protected boolean mStoppable
public void spin(float veloc,
float acceleration)
public void spin(float veloc,
float acceleration,
int maxSpinTime)
public void spinDistance(float distance,
float acceleration,
int duration)
distance - acceleration - duration - public void spinToSnap(boolean positive,
float acceleration,
int duration)
positive - acceleration - duration - public void spinTo(float position,
float acceleration,
int duration)
position - acceleration - duration - public void spinToStart(float acceleration,
int duration)
acceleration - duration - public void spinToEnd(float acceleration,
int duration)
acceleration - duration - protected void startSwipe()
startSwipe in class HGrouppublic float getVelocity()
getVelocity in interface Wheelpublic float getAcceleration()
public int getMaxSpinTime()
public void onAnimationEnd(Animator animator)
onAnimationEnd in interface Animator.AnimatorListenerpublic void onAnimationUpdate(Animator animator, float value)
onAnimationUpdate in interface Animator.AnimatorListenerprotected void onTouchDown(MotionEvent event)
HGrouponTouchDown in class HGroup