当前位置: 首页>>代码示例>>Java>>正文


Java YouTubePlayerSupportFragment类代码示例

本文整理汇总了Java中com.google.android.youtube.player.YouTubePlayerSupportFragment的典型用法代码示例。如果您正苦于以下问题:Java YouTubePlayerSupportFragment类的具体用法?Java YouTubePlayerSupportFragment怎么用?Java YouTubePlayerSupportFragment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


YouTubePlayerSupportFragment类属于com.google.android.youtube.player包,在下文中一共展示了YouTubePlayerSupportFragment类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState){
    View rootView2;


    //getActivity().setTitle("Movie Show");
    rootView2=inflater.inflate(R.layout.tab_fragment_2, container, false);
    TextView title2 = (TextView) rootView2.findViewById(R.id.title2);
    title2.setVisibility(View.VISIBLE);

    title2.setText(R.string.tab2Text);
    mVideoId2 = getString(R.string.tab2VideoID);
    Log.d("mVideoId2 is ", mVideoId2);

    playerFragment2 = (YouTubePlayerSupportFragment) getChildFragmentManager().findFragmentById(R.id.moviePlayer2);
    playerFragment2.setUserVisibleHint(true);

    return rootView2;
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:21,代码来源:Fragment2.java

示例2: onCreateView

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState){
    View rootView1;


    //getActivity().setTitle("Movie Show");

    rootView1=inflater.inflate(R.layout.tab_fragment_1, container, false);
    TextView title1 = (TextView) rootView1.findViewById(R.id.title1);
    title1.setVisibility(View.VISIBLE);

    title1.setText(R.string.tab1Text);
    mVideoId1 = getString(R.string.tab1VideoID);
    Log.d("mVideoId1 is ", mVideoId1);

    playerFragment1 = (YouTubePlayerSupportFragment) getChildFragmentManager().findFragmentById(R.id.moviePlayer1);
    playerFragment1.setUserVisibleHint(true);
    //playerFragment1.initialize(getString(R.string.google_maps_key), this);

    return rootView1;
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:23,代码来源:Fragment1.java

示例3: onCreateView

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState){
    View rootView3;


    //getActivity().setTitle("Movie Show");
    rootView3=inflater.inflate(R.layout.tab_fragment_3, container, false);
    TextView title3 = (TextView) rootView3.findViewById(R.id.title3);
    title3.setVisibility(View.VISIBLE);

    title3.setText(R.string.tab3Text);
    mVideoId3 = getString(R.string.tab3VideoID);
    Log.d("mVideoId3 is ", mVideoId3);

    playerFragment3 = (YouTubePlayerSupportFragment) getChildFragmentManager().findFragmentById(R.id.moviePlayer3);
    playerFragment3.setUserVisibleHint(true);

    return rootView3;
}
 
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:21,代码来源:Fragment3.java

示例4: YoutubeTrailerAdapter

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
public YoutubeTrailerAdapter(FragmentManager fm, List<MovieTrailer> movieTrailers1, String movieName) {
    super(fm);

    movieTrailers = new ArrayList<>();
    for(MovieTrailer trailer:movieTrailers1){
        if(trailer.site.equals("YouTube")){
            movieTrailers.add(trailer);
        }else {
            Log.v("NonYoutubeTrailer", trailer.site+trailer.key);
        }
    }
    trailerPlayerFragments = new YouTubePlayerSupportFragment[movieTrailers.size()];
    fragmentManagers = new FragmentManager[movieTrailers.size()];
    currentlyPlayingTrailer = -1;
    numOfTrailers = movieTrailers.size();
    this.movieName = movieName;
    this.childFragmentManager = fm;
}
 
开发者ID:muddassir235,项目名称:Pop-Movies-Android-App,代码行数:19,代码来源:YoutubeTrailerAdapter.java

示例5: setupView

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
private void setupView() {
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    FloatingActionButton facebook = (FloatingActionButton) findViewById(R.id.facebook);
    facebook.setOnClickListener(onFacebookClickListener);

    FloatingActionButton twitter = (FloatingActionButton) findViewById(R.id.twitter);
    twitter.setOnClickListener(onTwitterClickListener);

    YoutubePlayer youtubePlayer = new YoutubePlayer(this);

    youtubeFragment = (YouTubePlayerSupportFragment) getSupportFragmentManager()
            .findFragmentById(R.id.youtube_fragment);
    if(youtubeFragment != null) {
        youtubeFragment.initialize(youtubePlayer.getYoutubeKey(), onYoutubeInitializeListener);
    }
}
 
开发者ID:rapidpro,项目名称:ureport-android,代码行数:20,代码来源:AboutActivity.java

示例6: onCreateView

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    this.sharedPref = PreferenceManager.getDefaultSharedPreferences(getContext());
    this.context = getContext();

    sharedPreference = ListPreferences.getInstance(this.context);

    if (sharedPreference.isNightModeActive(context)) {
        nightMode = true;
    } else {
        nightMode = false;
    }

    View view = inflater.inflate(R.layout.detail_launch_summary, container, false);

    ButterKnife.bind(this, view);
    youTubePlayerFragment = YouTubePlayerSupportFragment.newInstance();
    FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
    transaction.add(R.id.youtube_view, youTubePlayerFragment).commit();


    return view;
}
 
开发者ID:ItsCalebJones,项目名称:SpaceLaunchNow-Android,代码行数:24,代码来源:SummaryDetailFragment.java

示例7: onCreate

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_youtube);

    mPlayerFragment =
            (YouTubePlayerSupportFragment) getSupportFragmentManager().findFragmentById(R.id.youtube_fragment);
    mPlayerFragment.initialize(getString(R.string.android_simple_api_access_key), this);

    setRequestedOrientation(PORTRAIT_ORIENTATION);
}
 
开发者ID:gdgjodhpur,项目名称:gdgapp,代码行数:13,代码来源:YoutubeActivity.java

示例8: onCreate

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
protected void onCreate(Bundle paramBundle)
{
  super.onCreate(paramBundle);
  setContentView(2130903085);
  aj.a(this, findViewById(16908290), "coda.ttf");
  if (paramBundle != null)
    this.d = paramBundle.getString("video_url");
  Intent localIntent;
  for (this.c = paramBundle.getString("title"); ; this.c = localIntent.getStringExtra("title"))
  {
    ((TextView)findViewById(2131230747)).setText(this.c);
    this.b = ((YouTubePlayerSupportFragment)getSupportFragmentManager().a(2131230869));
    this.b.a("AIzaSyB0PCixY_NOhjG0M-6YWaNz5mL8IUIVD0M", this);
    setResult(0, b());
    return;
    localIntent = getIntent();
    this.d = localIntent.getStringExtra("video_url");
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:YouTubeActivity.java

示例9: fillData

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
public void fillData(String url) {
    this.mUrlYoutubeVideo = url;
    YouTubePlayerSupportFragment youTubePlayerFragment = YouTubePlayerSupportFragment.newInstance();
    FragmentTransaction transaction = getBaseActivity().getSupportFragmentManager().beginTransaction();
    transaction.add(R.id.youtube_layout, youTubePlayerFragment).commit();
    youTubePlayerFragment.initialize(getBaseActivity().getResources().getString(R.string.developer_key_youtube), this);
}
 
开发者ID:ttpho,项目名称:Android-Video-Youtube-View,代码行数:8,代码来源:YoutubeVideoView.java

示例10: getYouTubePlayerProvider

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
@Override
protected YouTubePlayer.Provider getYouTubePlayerProvider() {
    return new YouTubePlayerSupportFragment();
}
 
开发者ID:muddassir235,项目名称:Pop-Movies-Android-App,代码行数:5,代码来源:YoutubeTrailerFragment.java

示例11: setYouTubePlayerFragment

import com.google.android.youtube.player.YouTubePlayerSupportFragment; //导入依赖的package包/类
public void setYouTubePlayerFragment(YouTubePlayerSupportFragment youTubePlayerFragment) {
    this.youTubePlayerFragment = youTubePlayerFragment;
}
 
开发者ID:Ksj7,项目名称:BandWith,代码行数:4,代码来源:VideoListAdapter.java


注:本文中的com.google.android.youtube.player.YouTubePlayerSupportFragment类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。