public class SmoothHandler extends Handler
ISmoothTargetHandler.Callback| Constructor and Description |
|---|
SmoothHandler(WeakReference<ISmoothTarget> targetWeakReference)
generally use for the progress widget
|
SmoothHandler(WeakReference<ISmoothTarget> targetWeakReference,
Looper looper) |
| Modifier and Type | Method and Description |
|---|---|
float |
getMinInternalPercent() |
float |
getSmoothInternalPercent() |
void |
handleMessage(Message msg) |
void |
loopSmooth(float percent)
if the provider percent(the aim percent) more than minInternalPercent, it will be split to the several smoothInternalPercent
|
void |
setMinInternalPercent(float minInternalPercent)
if the provider percent more than minInternalPercent, it will be split to the several smoothInternalPercent
|
void |
setSmoothInternalPercent(float smoothInternalPercent)
if the provider percent more than minInternalPercent, it will be split to the several smoothInternalPercent
|
dispatchMessage, dump, getLooper, getMessageName, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toStringpublic SmoothHandler(WeakReference<ISmoothTarget> targetWeakReference)
targetWeakReference - the weak reference of the smooth targetpublic SmoothHandler(WeakReference<ISmoothTarget> targetWeakReference, Looper looper)
public float getMinInternalPercent()
public void setMinInternalPercent(float minInternalPercent)
minInternalPercent - the min internal of the percent, default 0.1setSmoothInternalPercent(float)public float getSmoothInternalPercent()
public void setSmoothInternalPercent(float smoothInternalPercent)
smoothInternalPercent - the internal of the percent will provide the smooth effect, default 0.01setMinInternalPercent(float)public void handleMessage(Message msg)
handleMessage in class Handlerpublic void loopSmooth(float percent)
percent - the aim percent