public class ToastStrategy extends java.lang.Object implements IToastStrategy
| Constructor and Description |
|---|
ToastStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
areNotificationsEnabled(android.content.Context context)
是否有通知栏权限
|
void |
bindStyle(IToastStyle<?> style)
绑定样式
|
void |
cancelToast()
取消 Toast
|
IToast |
createToast(android.app.Application application)
创建 Toast
|
protected int |
getToastDuration(java.lang.CharSequence text)
获取 Toast 显示时长
|
void |
registerStrategy(android.app.Application application)
注册策略
|
void |
showToast(java.lang.CharSequence text)
显示 Toast
|
public 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 IToastStrategyprotected int getToastDuration(java.lang.CharSequence text)
protected boolean areNotificationsEnabled(android.content.Context context)