-
-
Save Mauker1/79ff4216023c92abc87d7549eb97cff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Fragment getVitrine() { | |
if (!mFragments.containsKey(mFragmentTypes.VITRINE)) { | |
mFragments.put(mFragmentTypes.VITRINE,mFragmentTypes.VITRINE.getFragment()); | |
} | |
return mFragments.get(mFragmentTypes.VITRINE); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum mFragmentTypes { | |
VITRINE { | |
@Override | |
public Fragment getFragment() { | |
return VitrineFragment.newInstance(); | |
} | |
}, | |
MY_BOOKS { | |
@Override | |
public Fragment getFragment() { | |
return new MyBooksFragment(); | |
} | |
}, | |
A_TEMATICAS { | |
@Override | |
public Fragment getFragment() { | |
return new AreasTematicasFragment(); | |
} | |
}, | |
ABOUT { | |
@Override | |
public Fragment getFragment() { | |
return new AboutFragment(); | |
} | |
}; | |
public abstract Fragment getFragment(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment