Class ToastUtils

  • All Implemented Interfaces:

    
    public final class ToastUtils
    
                        

    Toast utility class for internal SDK toast display.

    Apps can use setInterceptor to intercept SDK toasts.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface ToastUtils.ToastInterceptor

      SDK ChatUI toast interceptor.

    • 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) Shows a toast, subject to setInterceptor.
      static void setInterceptor(ToastUtils.ToastInterceptor interceptor) Sets the toast interceptor.
      • 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)

        Shows a toast, subject to setInterceptor.

        Parameters:
        context - context
        text - toast text
        duration - toast duration, LENGTH_SHORT or LENGTH_LONG