convert ViewPagerFragment to a local variable

This commit is contained in:
tibbi 2016-06-09 14:51:42 +02:00
parent 4e3efeb9ff
commit a733bef4c1
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,6 @@ import java.util.Map;
public class MyPagerAdapter extends FragmentStatePagerAdapter { public class MyPagerAdapter extends FragmentStatePagerAdapter {
private List<Medium> media; private List<Medium> media;
private ViewPagerFragment fragment;
private Map<Integer, ViewPagerFragment> fragments; private Map<Integer, ViewPagerFragment> fragments;
public MyPagerAdapter(FragmentManager fm, List<Medium> media) { public MyPagerAdapter(FragmentManager fm, List<Medium> media) {
@ -36,6 +35,7 @@ public class MyPagerAdapter extends FragmentStatePagerAdapter {
final Medium medium = media.get(position); final Medium medium = media.get(position);
final Bundle bundle = new Bundle(); final Bundle bundle = new Bundle();
bundle.putSerializable(Constants.MEDIUM, medium); bundle.putSerializable(Constants.MEDIUM, medium);
ViewPagerFragment fragment;
if (medium.getIsVideo()) { if (medium.getIsVideo()) {
fragment = new VideoFragment(); fragment = new VideoFragment();