[Android] Also animate the transition from groups in audio browser
Sébastien Toque
git at videolan.org
Sun Jun 24 10:52:02 CEST 2012
android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Jun 24 10:51:58 2012 +0200| [d1fb9b198ddebcd88c87d569c880bbba8b0967e4] | committer: Sébastien Toque
Also animate the transition from groups in audio browser
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=d1fb9b198ddebcd88c87d569c880bbba8b0967e4
---
.../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 1664d47..dc5ce01 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -209,8 +209,12 @@ public class AudioBrowserFragment extends SherlockFragment implements ISortable
b.putInt(AudioListFragment.EXTRA_MODE, mFlingViewGroup.getPosition());
audioList.setArguments(b);
- FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
- ft.replace(R.id.fragment_placeholder, audioList);
+ FragmentManager fm = getActivity().getSupportFragmentManager();
+ FragmentTransaction ft = fm.beginTransaction();
+ ft.setCustomAnimations(R.anim.anim_enter_left, R.anim.anim_leave_left, R.anim.anim_enter_left, 0);
+ ft.detach(fm.findFragmentByTag("audio"));
+ ft.setCustomAnimations(R.anim.anim_enter_right, R.anim.anim_leave_right, 0, R.anim.anim_leave_right);
+ ft.replace(R.id.fragment_placeholder, audioList, "tracks");
ft.addToBackStack(null);
ft.commit();
More information about the Android
mailing list