Package io.rong.imkit.utils

## Class ToastUtils

- All Implemented Interfaces:

      public final class ToastUtils

  toast 工具类，SDK 内部 toast 通过该类弹出。

  App 可以通过 setInterceptor 设置拦截器来拦截 SDK toast

  Author:

    rongcloud

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `public interface` | `ToastUtils.ToastInterceptor` | SDK IMKit toast 拦截器

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ToastUtils()` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `show(Context context, CharSequence text, int duration)` | 弹出 toast，受 setInterceptor 影响
    `static void` | `setInterceptor(ToastUtils.ToastInterceptor interceptor)` | 设置 toast 拦截器

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ToastUtils

          ToastUtils()

  - ### Method Detail

    - #### show

           static void show(Context context, CharSequence text, int duration)

      弹出 toast，受 setInterceptor 影响

      Parameters:
        `context` - context
        `text` - toast 文本
        `duration` - toast 显示时间, LENGTH_SHORT or LENGTH_LONG

    - #### setInterceptor

           static void setInterceptor(ToastUtils.ToastInterceptor interceptor)

      设置 toast 拦截器

      Parameters:
        `interceptor` - 拦截器 ToastInterceptor