Badge.OnDragStateChangedListener| 限定符和类型 | 字段和说明 |
|---|---|
protected ViewGroup |
mActivityRoot |
protected BadgeAnimator |
mAnimator |
protected float |
mBackgroundBorderWidth |
protected Paint |
mBadgeBackgroundBorderPaint |
protected Paint |
mBadgeBackgroundPaint |
protected RectF |
mBadgeBackgroundRect |
protected PointF |
mBadgeCenter |
protected int |
mBadgeGravity |
protected int |
mBadgeNumber |
protected float |
mBadgePadding |
protected java.lang.String |
mBadgeText |
protected Paint.FontMetrics |
mBadgeTextFontMetrics |
protected TextPaint |
mBadgeTextPaint |
protected RectF |
mBadgeTextRect |
protected float |
mBadgeTextSize |
protected Bitmap |
mBitmapClip |
protected int |
mColorBackground |
protected int |
mColorBackgroundBorder |
protected int |
mColorBadgeText |
protected PointF |
mControlPoint |
protected float |
mDefalutRadius |
protected PointF |
mDragCenter |
protected boolean |
mDraggable |
protected boolean |
mDragging |
protected boolean |
mDragOutOfRange |
protected Path |
mDragPath |
protected int |
mDragQuadrant |
protected Badge.OnDragStateChangedListener |
mDragStateChangedListener |
protected Drawable |
mDrawableBackground |
protected boolean |
mDrawableBackgroundClip |
protected boolean |
mExact |
protected float |
mFinalDragDistance |
protected float |
mGravityOffsetX |
protected float |
mGravityOffsetY |
protected int |
mHeight |
protected java.util.List<PointF> |
mInnertangentPoints |
protected PointF |
mRowBadgeCenter |
protected boolean |
mShowShadow |
protected View |
mTargetView |
protected int |
mWidth |
| 构造器和说明 |
|---|
QBadgeView(Context context) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
animateHide(PointF center) |
Badge |
bindTarget(View targetView) |
protected Bitmap |
createBadgeBitmap() |
Drawable |
getBadgeBackground() |
int |
getBadgeBackgroundColor() |
int |
getBadgeGravity() |
int |
getBadgeNumber() |
float |
getBadgePadding(boolean isDpValue) |
java.lang.String |
getBadgeText() |
int |
getBadgeTextColor() |
float |
getBadgeTextSize(boolean isSpValue) |
PointF |
getDragCenter() |
float |
getGravityOffsetX(boolean isDpValue) |
float |
getGravityOffsetY(boolean isDpValue) |
View |
getTargetView() |
void |
hide(boolean animate) |
boolean |
isDraggable() |
boolean |
isExactMode() |
boolean |
isShowShadow() |
protected void |
onAttachedToWindow() |
protected void |
onDraw(Canvas canvas) |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh) |
boolean |
onTouchEvent(MotionEvent event) |
void |
reset() |
protected void |
screenFromWindow(boolean screen) |
Badge |
setBadgeBackground(Drawable drawable) |
Badge |
setBadgeBackground(Drawable drawable,
boolean clip) |
Badge |
setBadgeBackgroundColor(int color) |
Badge |
setBadgeGravity(int gravity) |
Badge |
setBadgeNumber(int badgeNumber) |
Badge |
setBadgePadding(float padding,
boolean isDpValue) |
Badge |
setBadgeText(java.lang.String badgeText) |
Badge |
setBadgeTextColor(int color) |
Badge |
setBadgeTextSize(float size,
boolean isSpValue) |
Badge |
setExactMode(boolean isExact) |
Badge |
setGravityOffset(float offset,
boolean isDpValue) |
Badge |
setGravityOffset(float offsetX,
float offsetY,
boolean isDpValue) |
Badge |
setOnDragStateChangedListener(Badge.OnDragStateChangedListener l) |
Badge |
setShowShadow(boolean showShadow) |
Badge |
stroke(int color,
float width,
boolean isDpValue) |
protected int mColorBackground
protected int mColorBackgroundBorder
protected int mColorBadgeText
protected Drawable mDrawableBackground
protected Bitmap mBitmapClip
protected boolean mDrawableBackgroundClip
protected float mBackgroundBorderWidth
protected float mBadgeTextSize
protected float mBadgePadding
protected int mBadgeNumber
protected java.lang.String mBadgeText
protected boolean mDraggable
protected boolean mDragging
protected boolean mExact
protected boolean mShowShadow
protected int mBadgeGravity
protected float mGravityOffsetX
protected float mGravityOffsetY
protected float mDefalutRadius
protected float mFinalDragDistance
protected int mDragQuadrant
protected boolean mDragOutOfRange
protected RectF mBadgeTextRect
protected RectF mBadgeBackgroundRect
protected Path mDragPath
protected Paint.FontMetrics mBadgeTextFontMetrics
protected PointF mBadgeCenter
protected PointF mDragCenter
protected PointF mRowBadgeCenter
protected PointF mControlPoint
protected java.util.List<PointF> mInnertangentPoints
protected View mTargetView
protected int mWidth
protected int mHeight
protected TextPaint mBadgeTextPaint
protected Paint mBadgeBackgroundPaint
protected Paint mBadgeBackgroundBorderPaint
protected BadgeAnimator mAnimator
protected Badge.OnDragStateChangedListener mDragStateChangedListener
protected ViewGroup mActivityRoot
public Badge bindTarget(View targetView)
bindTarget 在接口中 Badgepublic View getTargetView()
getTargetView 在接口中 Badgeprotected void onAttachedToWindow()
public boolean onTouchEvent(MotionEvent event)
protected Bitmap createBadgeBitmap()
protected void screenFromWindow(boolean screen)
protected void onSizeChanged(int w,
int h,
int oldw,
int oldh)
protected void onDraw(Canvas canvas)
protected void animateHide(PointF center)
public void reset()
public Badge setBadgeNumber(int badgeNumber)
setBadgeNumber 在接口中 BadgebadgeNumber - equal to zero badge will be hidden, less than zero show dotpublic int getBadgeNumber()
getBadgeNumber 在接口中 Badgepublic Badge setBadgeText(java.lang.String badgeText)
setBadgeText 在接口中 Badgepublic java.lang.String getBadgeText()
getBadgeText 在接口中 Badgepublic Badge setExactMode(boolean isExact)
setExactMode 在接口中 Badgepublic boolean isExactMode()
isExactMode 在接口中 Badgepublic Badge setShowShadow(boolean showShadow)
setShowShadow 在接口中 Badgepublic boolean isShowShadow()
isShowShadow 在接口中 Badgepublic Badge setBadgeBackgroundColor(int color)
setBadgeBackgroundColor 在接口中 Badgepublic int getBadgeBackgroundColor()
getBadgeBackgroundColor 在接口中 Badgepublic Badge setBadgeBackground(Drawable drawable)
setBadgeBackground 在接口中 Badgepublic Badge setBadgeBackground(Drawable drawable, boolean clip)
setBadgeBackground 在接口中 Badgepublic Drawable getBadgeBackground()
getBadgeBackground 在接口中 Badgepublic Badge setBadgeTextColor(int color)
setBadgeTextColor 在接口中 Badgepublic int getBadgeTextColor()
getBadgeTextColor 在接口中 Badgepublic Badge setBadgeTextSize(float size, boolean isSpValue)
setBadgeTextSize 在接口中 Badgepublic float getBadgeTextSize(boolean isSpValue)
getBadgeTextSize 在接口中 Badgepublic Badge setBadgePadding(float padding, boolean isDpValue)
setBadgePadding 在接口中 Badgepublic float getBadgePadding(boolean isDpValue)
getBadgePadding 在接口中 Badgepublic boolean isDraggable()
isDraggable 在接口中 Badgepublic Badge setBadgeGravity(int gravity)
setBadgeGravity 在接口中 Badgegravity - only support Gravity.START | Gravity.TOP , Gravity.END | Gravity.TOP ,
Gravity.START | Gravity.BOTTOM , Gravity.END | Gravity.BOTTOM ,
Gravity.CENTER , Gravity.CENTER | Gravity.TOP , Gravity.CENTER | Gravity.BOTTOM ,
Gravity.CENTER | Gravity.START , Gravity.CENTER | Gravity.ENDpublic int getBadgeGravity()
getBadgeGravity 在接口中 Badgepublic Badge setGravityOffset(float offset, boolean isDpValue)
setGravityOffset 在接口中 Badgepublic Badge setGravityOffset(float offsetX, float offsetY, boolean isDpValue)
setGravityOffset 在接口中 Badgepublic float getGravityOffsetX(boolean isDpValue)
getGravityOffsetX 在接口中 Badgepublic float getGravityOffsetY(boolean isDpValue)
getGravityOffsetY 在接口中 Badgepublic Badge setOnDragStateChangedListener(Badge.OnDragStateChangedListener l)
setOnDragStateChangedListener 在接口中 Badgepublic PointF getDragCenter()
getDragCenter 在接口中 Badge