Class DefaultThumbnailView

    • Constructor Detail

      • DefaultThumbnailView

        public DefaultThumbnailView​(Context context)
      • DefaultThumbnailView

        public DefaultThumbnailView​(Context context,
                                    AttributeSet attrs,
                                    int defStyleAttr)
    • Method Detail

      • getThumbnailTolerance

        public long getThumbnailTolerance()
        Returns:
        the current thumbnail time tolerance in microseconds
      • setThumbnailTolerance

        public void setThumbnailTolerance​(long thumbnailToleranceUs)
        Set the thumbnail fetching tolerance when calling show(long, Callback, int).

        Defines the maximum time between the time of the requested thumbnail and a potentially already-loaded thumbnail in the index. If a matching nearby thumbnail with data is found, it will be returned immediately. Otherwise the requested thumbnail will be scheduled for fetching.

        Parameters:
        thumbnailToleranceUs - the tolerance in microseconds
      • setBorderPaint

        public void setBorderPaint​(@Nullable
                                   Paint borderPaint)
        Sets the Paint to use for rendering the Thumbnails. If null, the border will not be rendered.
        Parameters:
        borderPaint - the Paint to use
      • setThumbnailProvider

        public void setThumbnailProvider​(@Nullable
                                         ThumbnailProvider thumbnailProvider)
      • show

        public void show​(long positionUs,
                         DefaultThumbnailView.Callback sizeCallback)
        Render the current thumbnail for the given timestamp in microseconds
        Parameters:
        positionUs - The position to render a thumbnail for in microseconds
        sizeCallback - The callback that will be used to query the target size and location
      • hide

        public void hide()
        Hide the thumbnails
      • clear

        public void clear()
        Clear the currently displayed Thumbnail, if any