Created
May 12, 2015 15:56
-
-
Save masarugen/635872ca0891ff8fcaa3 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
public void nextMain() { | |
FragmentManager fm = getSupportFragmentManager(); | |
FragmentTransaction ft = fm.beginTransaction(); | |
ft.setCustomAnimations(R.anim.test_in, 0, 0, R.anim.test_out); | |
ft.add(R.id.fragment, new MainActivityFragment()); | |
ft.addToBackStack(null); | |
ft.commit(); | |
} | |
public void nextSecond() { | |
FragmentManager fm = getSupportFragmentManager(); | |
FragmentTransaction ft = fm.beginTransaction(); | |
ft.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_top, R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom); | |
ft.add(R.id.fragment, new SecondActivityFragment()); | |
ft.addToBackStack(null); | |
ft.commit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment