Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
davidohayon669 committed Apr 28, 2018
2 parents 4001e80 + abe3b6a commit 1c2d9dc
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,25 @@ public class VideoFragment extends YouTubePlayerFragment {

private YouTubeView mYouTubeView;

public VideoFragment(YouTubeView youTubeView) {
public VideoFragment() {}


public void setYoutubeView(YouTubeView youTubeView) {
mYouTubeView = youTubeView;
}

public static VideoFragment newInstance(YouTubeView youTubeView) {
return new VideoFragment(youTubeView);
VideoFragment fragment = new VideoFragment();
fragment.setYoutubeView(youTubeView);
return fragment;
}

@Override
public void onResume() {
mYouTubeView.onVideoFragmentResume();
if (mYouTubeView != null) {
mYouTubeView.onVideoFragmentResume();
}

super.onResume();
}
}

0 comments on commit 1c2d9dc

Please sign in to comment.