I'm working on an app that is made up of several fragments
and I've decided to put animations between them. Searching, I found that I should use the setCustomAnimations
command to get the desired result, but I only get two possible animations: fade-in and fade-out.
Looking at the platform folders I'm using ( android-19
, or Android 4.4.2) I saw that there are other animations that are not available in my SDK are present in the folder ( fragment_close_enter/exit
, fragment_fade_enter/exit
, fragment_open_enter/exit
).
Why is not my SDK recognizing them? This is the code I am using to create fragment
:
FragmentTransaction transFrag = getFragmentManager().beginTransaction();
Fragment login = new LoginFragment();
transFrag.setCustomAnimations(android.R.animator.fade_in,
android.R.animator.fade_out);
transFrag.addToBackStack(null);
transFrag.replace(R.id.container_login, login);
transFrag.commit();