Public 成员函数 | |
| AbSlidingButton (Context context) | |
| AbSlidingButton (Context context, AttributeSet attrs) | |
| void | setImageResource (int btnBottomResource, int btnFrameResource, int btnMaskResource, int btnNormalResource, int btnPressedResource) |
| boolean | isChecked () |
| void | setChecked (boolean checked) |
| void | setChecked (boolean checked, boolean anim) |
| void | setOnCheckedChangeListener (OnCheckedChangeListener listener) |
| boolean | onTouchEvent (MotionEvent event) |
| boolean | performClick () |
| void | toggle () |
Protected 成员函数 | |
| void | onDraw (Canvas canvas) |
| void | onMeasure (int paramInt1, int paramInt2) |
Private 成员函数 | |
| void | init (Context context) |
| float | getRealPos (float paramFloat) |
| void | moveView (float pos) |
| void | moveView (final float pos, boolean delay) |
| void | startAnimation () |
| void | moveViewToTarget () |
Private 属性 | |
| Context | context |
| Bitmap | btnFrame |
| Bitmap | btnMask |
| Bitmap | btnBottom |
| Bitmap | mBtnNormal |
| Bitmap | mBtnPressed |
| OnCheckedChangeListener | onCheckedChangeListener |
| boolean | isChecked |
| float | mMaskHeight |
| float | mMaskWidth |
| float | mBtnOffPos |
| float | mBtnOnPos |
| float | mBtnPos |
| float | mLastBtnPos |
| float | mRealPos |
| float | mBtnWidth |
| float | mExtendOffsetY |
| int | mAlpha |
| Paint | mPaint |
| PorterDuffXfermode | mXfermode |
| RectF | mSaveLayerRectF |
| Bitmap | mCurBtnPic |
| float | mFirstDownX |
| boolean | mMoveEvent |
| boolean | mAnimating |
| float | mAnimationPosition |
| float | mAnimatedVelocity |
| Handler | handler |
© 2012 amsoft.cn 名称:AbSlidingButton.java 描述:滑动按钮
|
inline |
Instantiates a new ab sliding button.
| context | the context |
|
inline |
Instantiates a new ab sliding button.
| context | the context |
| attrs | the attrs |
|
inlineprivate |
Gets the real pos.
| paramFloat | the param float |
|
inlineprivate |
Inits the.
| context | the context |
|
inline |
描述:获得当前.
|
inlineprivate |
描述:滑块移动.
| pos | the pos |
|
inlineprivate |
描述:滑块移动.
| pos | the pos |
| delay | the delay |
|
inlineprivate |
描述:直接移动到位置.
|
inlineprotected |
|
inlineprotected |
描述:测量View的宽高.
| paramInt1 | the param int1 |
| paramInt2 | the param int2 |
|
inline |
描述:滑动事件.
| event | the event |
|
inline |
|
inline |
描述:设置选中.
| checked | the new checked |
|
inline |
描述:设置选中.
| checked | the checked |
| anim | the anim |
|
inline |
描述:设置图片资源.
| btnBottomResource | the btn bottom resource |
| btnFrameResource | the btn frame resource |
| btnMaskResource | the btn mask resource |
| btnNormalResource | the btn normal resource |
| btnPressedResource | the btn pressed resource |
|
inline |
描述:设置监听器.
| listener | the new on checked change listener |
|
inlineprivate |
描述:用位移加速度实现动画.
|
inline |
|
private |
The btn bottom.
|
private |
The btn frame.
|
private |
The btn mask.
|
private |
The context.
|
private |
The handler.
|
private |
The is checked.
|
private |
The m alpha.
|
private |
The m animated velocity.
|
private |
The m animating.
|
private |
The m animation position.
|
private |
The m btn normal.
|
private |
The m btn off pos.
|
private |
The m btn on pos.
|
private |
The m btn pos.
|
private |
The m btn pressed.
|
private |
The m btn width.
|
private |
The m cur btn pic.
|
private |
The m extend offset y.
|
private |
The m first down x.
|
private |
The m last btn pos.
|
private |
The m mask height.
|
private |
The m mask width.
|
private |
The m move event.
|
private |
The m paint.
|
private |
The m real pos.
|
private |
The m save layer rect f.
|
private |
The m xfermode.
|
private |
The on checked change listener.
1.8.8