public class ToastStrategy extends android.os.Handler implements IToastStrategy
| Constructor and Description |
|---|
ToastStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindStyle(IToastStyle<?> style)
绑定样式
|
void |
cancelToast()
取消 Toast
|
IToast |
createToast(android.app.Application application)
创建 Toast
|
protected int |
getToastDuration(java.lang.CharSequence text)
获取 Toast 显示时长
|
void |
handleMessage(android.os.Message msg) |
void |
registerStrategy(android.app.Application application)
注册策略
|
void |
showToast(java.lang.CharSequence text)
显示 Toast
|
createAsync, createAsync, dispatchMessage, dump, getLooper, getMessageName, hasCallbacks, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toStringpublic void registerStrategy(android.app.Application application)
IToastStrategyregisterStrategy in interface IToastStrategypublic void bindStyle(IToastStyle<?> style)
IToastStrategybindStyle in interface IToastStrategypublic IToast createToast(android.app.Application application)
IToastStrategycreateToast in interface IToastStrategypublic void showToast(java.lang.CharSequence text)
IToastStrategyshowToast in interface IToastStrategypublic void cancelToast()
IToastStrategycancelToast in interface IToastStrategypublic void handleMessage(android.os.Message msg)
handleMessage in class android.os.Handlerprotected int getToastDuration(java.lang.CharSequence text)