YouTube

YouTubePlayerSupportFragment

public class
YouTubePlayerSupportFragment
extends Fragment
implements YouTubePlayer.Provider
java.lang.Object
   ↳ android.support.v4.app.Fragment
     ↳ com.google.android.youtube.player.YouTubePlayerSupportFragment

Overview

The support fragment version of YouTubePlayerFragment. See the javadoc for YouTubePlayerFragment for information on how to use this fragment. Note that if you use this class in your project, you must also link the Android Support Compatibility library into your project.

Summary

Public constructors
YouTubePlayerSupportFragment()
Creates a YouTube fragment.
Public methods
void initialize(String developerKey, YouTubePlayer.OnInitializedListener listener)
Initialize a YouTubePlayer which can be used to play videos and control video playback.
static YouTubePlayerSupportFragment newInstance()
Creates a YouTube fragment.
[Expand]
Inherited methods
void dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3)
final boolean equals(Object arg0)
final FragmentActivity getActivity()
final Bundle getArguments()
final FragmentManager getFragmentManager()
final int getId()
LayoutInflater getLayoutInflater(Bundle arg0)
LoaderManager getLoaderManager()
final Resources getResources()
final boolean getRetainInstance()
final String getString(int arg0)
final String getString(int arg0, Object... arg1)
final String getTag()
final Fragment getTargetFragment()
final int getTargetRequestCode()
final CharSequence getText(int arg0)
boolean getUserVisibleHint()
View getView()
final int hashCode()
static Fragment instantiate(Context arg0, String arg1)
static Fragment instantiate(Context arg0, String arg1, Bundle arg2)
final boolean isAdded()
final boolean isDetached()
final boolean isHidden()
final boolean isInLayout()
final boolean isRemoving()
final boolean isResumed()
final boolean isVisible()
void onActivityCreated(Bundle arg0)
void onActivityResult(int arg0, int arg1, Intent arg2)
void onAttach(Activity arg0)
void onConfigurationChanged(Configuration arg0)
boolean onContextItemSelected(MenuItem arg0)
void onCreate(Bundle arg0)
Animation onCreateAnimation(int arg0, boolean arg1, int arg2)
void onCreateContextMenu(ContextMenu arg0, View arg1, ContextMenu.ContextMenuInfo arg2)
void onCreateOptionsMenu(Menu arg0, MenuInflater arg1)
View onCreateView(LayoutInflater arg0, ViewGroup arg1, Bundle arg2)
void onDestroy()
void onDestroyOptionsMenu()
void onDestroyView()
void onDetach()
void onHiddenChanged(boolean arg0)
void onInflate(Activity arg0, AttributeSet arg1, Bundle arg2)
void onLowMemory()
boolean onOptionsItemSelected(MenuItem arg0)
void onOptionsMenuClosed(Menu arg0)
void onPause()
void onPrepareOptionsMenu(Menu arg0)
void onResume()
void onSaveInstanceState(Bundle arg0)
void onStart()
void onStop()
void onViewCreated(View arg0, Bundle arg1)
void registerForContextMenu(View arg0)
void setArguments(Bundle arg0)
void setHasOptionsMenu(boolean arg0)
void setInitialSavedState(Fragment.SavedState arg0)
void setMenuVisibility(boolean arg0)
void setRetainInstance(boolean arg0)
void setTargetFragment(Fragment arg0, int arg1)
void setUserVisibleHint(boolean arg0)
void startActivity(Intent arg0)
void startActivityForResult(Intent arg0, int arg1)
String toString()
void unregisterForContextMenu(View arg0)
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait()
final void wait(long arg0, int arg1)
final void wait(long arg0)
abstract void onConfigurationChanged(Configuration arg0)
abstract void onLowMemory()
abstract void onCreateContextMenu(ContextMenu arg0, View arg1, ContextMenu.ContextMenuInfo arg2)

Public constructors

public YouTubePlayerSupportFragment ()

Creates a YouTube fragment. This constructor is public only for use by an inflater. Use newInstance() to create a YouTubePlayerSupportFragment programmatically.

Public methods

public void initialize (String developerKey, YouTubePlayer.OnInitializedListener listener)

Initialize a YouTubePlayer which can be used to play videos and control video playback. One of the callbacks in listener will be invoked when the initialization succeeds or fails.

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 APIs Console.
listener The callbacks that will be invoked when the initialization succeeds or fails.

public static YouTubePlayerSupportFragment newInstance ()

Creates a YouTube fragment.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.