Example #1
0
 @Override
 public void onBackPressed() {
   Intent intent = new Intent();
   intent.putExtra("currentTab", currentTab);
   setResult(RESULT_OK, intent);
   super.onBackPressed();
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.vowelvdo1);

    YouTubePlayerView youTubePlayerView = (YouTubePlayerView) findViewById(R.id.youtubeplayerview);
    youTubePlayerView.initialize(API_KEY, this);
  }
Example #3
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    reference = this;
    YouTubePlayerView youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);

    youTubeView.initialize(DEVELOPER_KEY, this);
  }
Example #4
0
  @Override
  protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);

    setContentView(R.layout.activity_player);

    playerView = (YouTubePlayerView) findViewById(R.id.player_view);
    playerView.initialize(YoutubeConnector.KEY, this);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow()
        .setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.activity_main);

    youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);

    // Initializing video player with developer key
    youTubeView.initialize(Config.DEVELOPER_KEY, this);
  }
Example #6
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_play_video);
   //        hideicon=(ImageView)findViewById(R.id.hideicon);
   //        hideicon.setOnClickListener(new View.OnClickListener() {
   //            @Override
   //            public void onClick(View v) {
   //
   //                finish();
   //                overridePendingTransition(R.anim.no_change, R.anim.slide_down);
   //            }
   //        });
   Bundle extras = getIntent().getExtras();
   videoID = extras.getString("Video-ID");
   autoplay = extras.getBoolean("autoplay");
   currentTab = extras.getString("currentTab");
   YouTubePlayerView youTubePlayerView = (YouTubePlayerView) findViewById(R.id.youtube_player);
   youTubePlayerView.initialize(DEVELOPER_KEY, this);
 }