setup a fragment listener after orientation change if theres none

This commit is contained in:
tibbi 2016-06-14 12:42:11 +02:00
parent 74a4a5173c
commit 05af0f7862
2 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,9 @@ public class PhotoFragment extends ViewPagerFragment implements View.OnClickList
@Override
public void onClick(View v) {
if (listener == null)
listener = (FragmentClickListener) getActivity();
listener.fragmentClicked();
}

View File

@ -156,6 +156,9 @@ public class VideoFragment extends ViewPagerFragment
default:
isFullscreen = !isFullscreen;
checkFullscreen();
if (listener == null)
listener = (FragmentClickListener) getActivity();
listener.fragmentClicked();
break;
}