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


public class
extends Fragment
implements YouTubePlayer.Provider


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.


Public constructors
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.
Inherited methods
void dump(String arg0, FileDescriptor arg1, PrintWriter arg2, String[] arg3)
final boolean equals(Object arg0)
final FragmentActivity getActivity()
boolean getAllowEnterTransitionOverlap()
boolean getAllowReturnTransitionOverlap()
final Bundle getArguments()
final FragmentManager getChildFragmentManager()
Object getEnterTransition()
Object getExitTransition()
final FragmentManager getFragmentManager()
final int getId()
LayoutInflater getLayoutInflater(Bundle arg0)
LoaderManager getLoaderManager()
final Fragment getParentFragment()
Object getReenterTransition()
final Resources getResources()
final boolean getRetainInstance()
Object getReturnTransition()
Object getSharedElementEnterTransition()
Object getSharedElementReturnTransition()
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 boolean hasOptionsMenu()
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 isMenuVisible()
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 onViewStateRestored(Bundle arg0)
void registerForContextMenu(View arg0)
void setAllowEnterTransitionOverlap(boolean arg0)
void setAllowReturnTransitionOverlap(boolean arg0)
void setArguments(Bundle arg0)
void setEnterSharedElementCallback(SharedElementCallback arg0)
void setEnterTransition(Object arg0)
void setExitSharedElementCallback(SharedElementCallback arg0)
void setExitTransition(Object arg0)
void setHasOptionsMenu(boolean arg0)
void setInitialSavedState(Fragment.SavedState arg0)
void setMenuVisibility(boolean arg0)
void setReenterTransition(Object arg0)
void setRetainInstance(boolean arg0)
void setReturnTransition(Object arg0)
void setSharedElementEnterTransition(Object arg0)
void setSharedElementReturnTransition(Object 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.

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

public static YouTubePlayerSupportFragment newInstance ()

Creates a YouTube fragment.