Class HandlerCompat


public final class HandlerCompat extends Object
Compatability wrapper over Handler.
  • Constructor Details

    • HandlerCompat

      public HandlerCompat()
  • Method Details

    • createAsyncHandler

      public static Handler createAsyncHandler(Looper looper)
      Create a new Handler whose posted messages and runnables are not subject to synchronization barriers such as display vsync.

      Messages sent to an async handler are guaranteed to be ordered with respect to one another, but not necessarily with respect to messages from other Handlers. Compatibility behavior:

      • SDK 28 and above, this method matches platform behavior.
      • Otherwise, returns a synchronous handler instance.
      looper - the Looper that the new Handler should be bound to
      a new async Handler instance
      See Also: