1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

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.
This commit is contained in:
Jesse Vincent 2013-02-05 12:01:44 -05:00
parent 499e20ef76
commit 3b8421a9a8
5 changed files with 10 additions and 30 deletions

View File

@ -1,13 +1,8 @@
<set xmlns:android="http://schemas.android.com/apk/res/android" > <set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate <translate
android:duration="200" android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="-50%p" android:fromXDelta="-100%p"
android:toXDelta="0" /> android:toXDelta="0" />
<alpha
android:duration="200"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set> </set>

View File

@ -1,13 +1,8 @@
<set xmlns:android="http://schemas.android.com/apk/res/android" > <set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate <translate
android:duration="200" android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="50%p" android:fromXDelta="100%p"
android:toXDelta="0" /> android:toXDelta="0" />
<alpha
android:duration="200"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set> </set>

View File

@ -1,13 +1,8 @@
<set xmlns:android="http://schemas.android.com/apk/res/android" > <set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate <translate
android:duration="200" android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="0" android:fromXDelta="0"
android:toXDelta="-50%p" /> android:toXDelta="-100%p" />
<alpha
android:duration="200"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set> </set>

View File

@ -1,13 +1,9 @@
<set xmlns:android="http://schemas.android.com/apk/res/android" > <set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate <translate
android:duration="200" android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="0" android:fromXDelta="0"
android:toXDelta="50%p" /> android:toXDelta="100%p" />
<alpha
android:duration="200"
android:fromAlpha="1.0"
android:toAlpha="0.0" />
</set> </set>

View File

@ -200,7 +200,7 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
} else { } else {
setContentView(R.layout.message_list); setContentView(R.layout.message_list);
mViewSwitcher = (ViewSwitcher) findViewById(R.id.container); mViewSwitcher = (ViewSwitcher) findViewById(R.id.container);
mViewSwitcher.setAnimateFirstView(false); mViewSwitcher.setAnimateFirstView(true);
mViewSwitcher.setFirstInAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_left)); mViewSwitcher.setFirstInAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_left));
mViewSwitcher.setFirstOutAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_out_right)); mViewSwitcher.setFirstOutAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_out_right));
mViewSwitcher.setSecondInAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_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() { private void showMessageList() {
mMessageListWasDisplayed = true; mMessageListWasDisplayed = true;
mDisplayMode = DisplayMode.MESSAGE_LIST; mDisplayMode = DisplayMode.MESSAGE_LIST;
mViewSwitcher.showFirstView(); mViewSwitcher.showFirstView();
removeMessageViewFragment();
mMessageListFragment.setActiveMessage(null); mMessageListFragment.setActiveMessage(null);
showDefaultTitleView(); showDefaultTitleView();
removeMessageViewFragment();
} }
private void showMessageView() { private void showMessageView() {