From 3b8421a9a85ec108be80d9ef9bc14e77ff42947d Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 5 Feb 2013 12:01:44 -0500 Subject: [PATCH] Tweak animations to use the (Slightly slower) android default animation speed. Remove the fadeout to make things look a little less weird Make the animations slide in from the edge. (See the aforementioned comment about jankyness) TODO: don't remove the message view until _after_ the animation runs. Before HC, that requires rather a lot more code (writing a whole animationadapter) than it should. TODO: get the messageview to stop jumping to hide the header area as it's displayed. --- res/anim/slide_in_left.xml | 9 ++------- res/anim/slide_in_right.xml | 9 ++------- res/anim/slide_out_left.xml | 9 ++------- res/anim/slide_out_right.xml | 8 ++------ src/com/fsck/k9/activity/MessageList.java | 5 ++--- 5 files changed, 10 insertions(+), 30 deletions(-) diff --git a/res/anim/slide_in_left.xml b/res/anim/slide_in_left.xml index 21834d200..8c0ea086c 100644 --- a/res/anim/slide_in_left.xml +++ b/res/anim/slide_in_left.xml @@ -1,13 +1,8 @@ - - \ No newline at end of file diff --git a/res/anim/slide_in_right.xml b/res/anim/slide_in_right.xml index 5eb0f6b18..f830d3f77 100644 --- a/res/anim/slide_in_right.xml +++ b/res/anim/slide_in_right.xml @@ -1,13 +1,8 @@ - - \ No newline at end of file diff --git a/res/anim/slide_out_left.xml b/res/anim/slide_out_left.xml index 6d9636735..f672b190c 100644 --- a/res/anim/slide_out_left.xml +++ b/res/anim/slide_out_left.xml @@ -1,13 +1,8 @@ - - + android:toXDelta="-100%p" /> \ No newline at end of file diff --git a/res/anim/slide_out_right.xml b/res/anim/slide_out_right.xml index 1fafb2534..fd89cad27 100644 --- a/res/anim/slide_out_right.xml +++ b/res/anim/slide_out_right.xml @@ -1,13 +1,9 @@ + android:toXDelta="100%p" /> - \ No newline at end of file diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 57457acb4..95c733d51 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -200,7 +200,7 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme } else { setContentView(R.layout.message_list); mViewSwitcher = (ViewSwitcher) findViewById(R.id.container); - mViewSwitcher.setAnimateFirstView(false); + mViewSwitcher.setAnimateFirstView(true); mViewSwitcher.setFirstInAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_left)); mViewSwitcher.setFirstOutAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_out_right)); mViewSwitcher.setSecondInAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_right)); @@ -1356,13 +1356,12 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme private void showMessageList() { mMessageListWasDisplayed = true; mDisplayMode = DisplayMode.MESSAGE_LIST; - mViewSwitcher.showFirstView(); - removeMessageViewFragment(); mMessageListFragment.setActiveMessage(null); showDefaultTitleView(); + removeMessageViewFragment(); } private void showMessageView() {