convert ViewPagerFragment to a local variable
This commit is contained in:
parent
4e3efeb9ff
commit
a733bef4c1
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue