Interface ThumbnailProvider.Callback

Enclosing interface:
ThumbnailProvider

public static interface ThumbnailProvider.Callback
Because loading Thumbnails is usually an asynchronous process, this callback interface needs to be implemented to receive the results when a thumbnail was requested.

Note that implementations of ThumbnailProvider must ensure that onThumbnailLoaded(long, long, Bitmap) is always called on the main application thread.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onThumbnailLoaded(long requestedPositionUs, long actualPositionUs, Bitmap thumbnail)
    Called after a thumbnail load finished.
  • Method Details

    • onThumbnailLoaded

      void onThumbnailLoaded(long requestedPositionUs, long actualPositionUs, @Nullable Bitmap thumbnail)
      Called after a thumbnail load finished. Note that the thumbnail might be null if no data was found for the given position.
      Parameters:
      requestedPositionUs - The requested position in micro seconds
      actualPositionUs - The actual position of the thumbnail in micro seconds, or -1 if no data was found
      thumbnail - The thumbnail