本文整理匯總了Java中com.google.android.youtube.player.YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性的典型用法代碼示例。如果您正苦於以下問題:Java YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性的具體用法?Java YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI怎麽用?Java YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.google.android.youtube.player.YouTubePlayer
的用法示例。
在下文中一共展示了YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onInitializationSuccess
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
YouTubePlayer youTubePlayer, boolean wasRestored) {
// Set up YouTube player
mYouTubePlayer = youTubePlayer;
mYouTubePlayer.setPlayerStateChangeListener(this);
mYouTubePlayer.setFullscreen(mIsFullscreen);
mYouTubePlayer.setOnFullscreenListener(this);
// YouTube player flags: use a custom full screen layout; let the YouTube player control
// the system UI (hiding navigation controls, ActionBar etc); and let the YouTube player
// handle the orientation state of the activity.
mYouTubeFullscreenFlags = YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT |
YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI |
YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION;
// On smaller screen devices always switch to full screen in landscape mode
if (!mIsTablet) {
mYouTubeFullscreenFlags |= YouTubePlayer.FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE;
}
// Apply full screen flags
mYouTubePlayer.setFullscreenControlFlags(mYouTubeFullscreenFlags);
// Load the requested video
if (!TextUtils.isEmpty(mYouTubeVideoId)) {
mYouTubePlayer.loadVideo(mYouTubeVideoId);
}
}
示例2: onInitializationSuccess
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
YouTubePlayer youTubePlayer, boolean wasRestored) {
// Set up YouTube player
mYouTubePlayer = youTubePlayer;
mYouTubePlayer.setPlayerStateChangeListener(this);
mYouTubePlayer.setFullscreen(mIsFullscreen);
mYouTubePlayer.setOnFullscreenListener(this);
// YouTube player flags: use a custom full screen layout; let the YouTube player control
// the system UI (hiding navigation controls, ActionBar etc); and let the YouTube player
// handle the orientation state of the activity.
mYouTubeFullscreenFlags = YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT |
YouTubePlayer.FULLSCREEN_FLAG_CONTROL_SYSTEM_UI |
YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION;
// On smaller screen devices always switch to full screen in landscape mode
if (!mIsTablet) {
mYouTubeFullscreenFlags |= YouTubePlayer.FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE;
}
// Apply full screen flags
setFullscreenFlags();
// If a presentation display is available, set YouTube player style to minimal
if (mPresentation != null) {
mYouTubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.MINIMAL);
}
// Load the requested video
if (!TextUtils.isEmpty(mYouTubeVideoId)) {
mYouTubePlayer.loadVideo(mYouTubeVideoId);
}
updatePresentation();
}