Package io.rong.imkit.utils
Class ToastUtils
-
- All Implemented Interfaces:
public final class ToastUtilstoast 工具类,SDK 内部 toast 通过该类弹出。
App 可以通过 setInterceptor 设置拦截器来拦截 SDK toast
rongcloud
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceToastUtils.ToastInterceptorSDK IMKit toast 拦截器
-
Constructor Summary
Constructors Constructor Description ToastUtils()
-
Method Summary
Modifier and Type Method Description static voidshow(Context context, CharSequence text, int duration)弹出 toast,受 setInterceptor 影响 static voidsetInterceptor(ToastUtils.ToastInterceptor interceptor)设置 toast 拦截器 -
-
Method Detail
-
show
static void show(Context context, CharSequence text, int duration)
弹出 toast,受 setInterceptor 影响
- Parameters:
context- contexttext- toast 文本duration- toast 显示时间, LENGTH_SHORT or LENGTH_LONG
-
setInterceptor
static void setInterceptor(ToastUtils.ToastInterceptor interceptor)
设置 toast 拦截器
- Parameters:
interceptor- 拦截器 ToastInterceptor
-
-
-
-