我为youtube视频使用视频观看但OnCreateOptionsMenu
未运行。如何使用未使用youtubeplayerfragment?是否支持使用YouTubeBaseActivity内部支持?
此videoactivity.class
public class videoactivity extends YouTubeBaseActivity{
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean loadAgain) {
if (!loadAgain) {
youTubePlayer.cueVideo(ID_VIDEO);
}
}
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
}
}
和OnCreateOptionsMenu
方法:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.video_menu, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
super.onOptionsItemSelected(item);
this.finish();
goBackWithAnimation();
break;
case R.id.share_button:
showShareOptions();
break;
}
return true;
}
但没有跑步。怎么用?