[Android] animate directory view
Sébastien Toque
git at videolan.org
Wed Jun 27 23:41:53 CEST 2012
android | branch: master | Sébastien Toque <xilasz at gmail.com> | Wed Jun 27 21:37:00 2012 +0200| [a2a3292d1f95ba5b789d27bd64ae670800d7e4e6] | committer: Sébastien Toque
animate directory view
> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=a2a3292d1f95ba5b789d27bd64ae670800d7e4e6
---
vlc-android/res/anim/anim_enter_bottom.xml | 2 +-
vlc-android/res/anim/anim_leave_bottom.xml | 2 +-
vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 10 +++-------
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/vlc-android/res/anim/anim_enter_bottom.xml b/vlc-android/res/anim/anim_enter_bottom.xml
index 8614cd1..750e083 100644
--- a/vlc-android/res/anim/anim_enter_bottom.xml
+++ b/vlc-android/res/anim/anim_enter_bottom.xml
@@ -4,5 +4,5 @@
<translate
android:fromXDelta="0%" android:toXDelta="0%"
android:fromYDelta="100%" android:toYDelta="0%"
- android:duration="1000"/>
+ android:duration="500"/>
</set>
diff --git a/vlc-android/res/anim/anim_leave_bottom.xml b/vlc-android/res/anim/anim_leave_bottom.xml
index 46efbf7..4bc77bb 100644
--- a/vlc-android/res/anim/anim_leave_bottom.xml
+++ b/vlc-android/res/anim/anim_leave_bottom.xml
@@ -4,5 +4,5 @@
<translate
android:fromXDelta="0%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="100%"
- android:duration="1000"/>
+ android:duration="500"/>
</set>
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 3329f96..7d34443 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -299,6 +299,8 @@ public class MainActivity extends SherlockFragmentActivity {
private void showDirectoryView() {
FragmentTransaction ft = this.getSupportFragmentManager().beginTransaction();
+ ft.setCustomAnimations(R.anim.anim_enter_bottom, 0);
+
/* Remove existing tabs */
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
/* Load directory view fragment */
@@ -310,13 +312,7 @@ public class MainActivity extends SherlockFragmentActivity {
private void hideDirectoryView() {
FragmentTransaction ft = this.getSupportFragmentManager().beginTransaction();
- /* Animate based on which tab is about to be loaded
- * Video comes in on left so exit right
- * Audio comes in on right so exit left */
-// if (mCurrentViewTab == AUDIO_TAB)
-// ft.setCustomAnimations(R.anim.anim_enter_left, R.anim.anim_leave_left, R.anim.anim_enter_left, 0);
-// else if (mCurrentViewTab == VIDEO_TAB)
-// ft.setCustomAnimations(R.anim.anim_enter_right, R.anim.anim_leave_right, 0, R.anim.anim_leave_right);
+ ft.setCustomAnimations(0, R.anim.anim_leave_bottom);
/* Restore the tabs */
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
More information about the Android
mailing list