YouTubeThumbnailLoader.OnThumbnailLoadedListener
com.google.android.youtube.player.YouTubeThumbnailLoader.OnThumbnailLoadedListener |
Overview
Interface definition for a listener that is invoked when a thumbnail has been loaded.
Summary
Public methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when there was an error loading a thumbnail.
| |||||||||||
Called when a YouTube thumbnail has been loaded into the view.
|
Public methods
public abstract void onThumbnailError (YouTubeThumbnailView thumbnail, YouTubeThumbnailLoader.ErrorReason reason)
Called when there was an error loading a thumbnail. The YouTubeThumbnailView
will not be be modified when an error is encountered, it will retain the same thumbnail
previously loaded into the view (or none if no thumbnail has been loaded).
This will always be called on the UI thread.
Parameters
thumbnail | The YouTube thumbnail view which encountered the error. |
reason | The reason for the error. |
public abstract void onThumbnailLoaded (YouTubeThumbnailView thumbnail, String videoId)
Called when a YouTube thumbnail has been loaded into the view. This will be called after
the YouTubeThumbnailView
has been updated to show the thumbnail which was loaded.
Note that changing the current video or playlist by calling setVideo(String)
or
setPlaylist(String)
) will cancel the currently loading thumbnail and you will only
get an onThumbnailLoaded
callback for the most recently loaded thumbnail.
This will always be called on the UI thread.
Parameters
thumbnail | The YouTube thumbnail view into which the thumbnail has been loaded. |
videoId | The YouTube video ID of the loaded thumbnail. |