Click here to see your recently viewed pages and most viewed pages.
Hide

YouTubeThumbnailView

public final class
YouTubeThumbnailView
extends ImageView
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ImageView
       ↳ com.google.android.youtube.player.YouTubeThumbnailView

Overview

A view which can be used to display YouTube thumbnails, either for a specific YouTube video or a YouTube playlist.

To get started, place this view in your view hierarchy and call initialize(String, OnInitializedListener) to create a YouTubeThumbnailLoader which you can use to load YouTubeThumbnails into this View.

Note that you must call the YouTubeThumbnailLoader interface's release() method when you are finished with an initialized YouTubeThumbnailLoader.

Summary

Nested Classes
interface YouTubeThumbnailView.OnInitializedListener An interface with definitions of callbacks invoked when thumbnail view initialization succeeds or fails. 
Inherited Constants
Inherited Fields
Public constructors
YouTubeThumbnailView(Context context)
Create a YouTubeThumbnailView.
YouTubeThumbnailView(Context context, AttributeSet attrs)
Create a YouTubeThumbnailView.
YouTubeThumbnailView(Context context, AttributeSet attrs, int defStyle)
Create a YouTubeThumbnailView.
Public methods
void initialize(String developerKey, YouTubeThumbnailView.OnInitializedListener onInitializedlistener)
Initialize a YouTubeThumbnailLoader which can be used to load thumbnails into this YouTubeThumbnailView.
Inherited Methods

Public constructors

public YouTubeThumbnailView (Context context)

Create a YouTubeThumbnailView.

Parameters
context The context this view should use.

public YouTubeThumbnailView (Context context, AttributeSet attrs)

Create a YouTubeThumbnailView. This constructor is for use by a LayoutInflater when the view is inflated from XML.

Parameters
context The context this view should use.
attrs The attributes of the XML tag that is inflating the view.

public YouTubeThumbnailView (Context context, AttributeSet attrs, int defStyle)

Create a YouTubeThumbnailView. This constructor is for use by a LayoutInflater when the view is inflated from XML.

Parameters
context The context this view should use.
attrs The attributes of the XML tag that is inflating the view.
defStyle The default style to apply to this view.

Public methods

public void initialize (String developerKey, YouTubeThumbnailView.OnInitializedListener onInitializedlistener)

Initialize a YouTubeThumbnailLoader which can be used to load thumbnails into this YouTubeThumbnailView.

Parameters
developerKey A valid API key which is enabled to use the YouTube Data API v3 service. To generate a new key, visit the Google Developers Console.
See Also