From dfd40e43da738119724733256bbc52533ef69b99 Mon Sep 17 00:00:00 2001 From: Coffeemakr Date: Mon, 16 Jan 2017 13:01:52 +0100 Subject: [PATCH 1/2] Fix for #407 --- .../org/schabi/newpipe/detail/VideoItemDetailFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java index 2c6e4b55a..4ff5534f2 100644 --- a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java @@ -647,8 +647,8 @@ public class VideoItemDetailFragment extends Fragment { } @Override - public void onActivityCreated(Bundle savedInstanceBundle) { - super.onActivityCreated(savedInstanceBundle); + public void onStart() { + super.onStart(); Activity a = getActivity(); infoItemBuilder = new InfoItemBuilder(a, a.findViewById(android.R.id.content)); From e4aa69b8d34fc7623d49ec183f2db8bf5df25509 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Mon, 16 Jan 2017 16:06:54 +0100 Subject: [PATCH 2/2] add some super.function() thingies --- .../org/schabi/newpipe/detail/VideoItemDetailActivity.java | 2 ++ .../org/schabi/newpipe/detail/VideoItemDetailFragment.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java index 591017a92..256547004 100644 --- a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java +++ b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java @@ -141,6 +141,7 @@ public class VideoItemDetailActivity extends AppCompatActivity { @Override public void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); outState.putString(VideoItemDetailFragment.VIDEO_URL, videoUrl); outState.putInt(VideoItemDetailFragment.STREAMING_SERVICE, currentStreamingService); outState.putBoolean(VideoItemDetailFragment.AUTO_PLAY, false); @@ -148,6 +149,7 @@ public class VideoItemDetailActivity extends AppCompatActivity { @Override public boolean onOptionsItemSelected(MenuItem item) { + super.onOptionsItemSelected(item); int id = item.getItemId(); if (id == android.R.id.home) { // This ID represents the Home or Up button. In the case of this diff --git a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java index 4ff5534f2..a93f37654 100644 --- a/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailFragment.java @@ -779,11 +779,13 @@ public class VideoItemDetailFragment extends Fragment { @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { + super.onCreateOptionsMenu(menu, inflater); actionBarHandler.setupMenu(menu, inflater); } @Override public boolean onOptionsItemSelected(MenuItem item) { + super.onOptionsItemSelected(item); return actionBarHandler.onItemSelected(item); } @@ -806,6 +808,7 @@ public class VideoItemDetailFragment extends Fragment { @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case RECAPTCHA_REQUEST: if (resultCode == RESULT_OK) {