My suggestion would be -- generally don't do this.  Animations during
activity transitions are done by the window manager, on their windows.
 Prior to 2.0, these were turned off by default (though could be turned on
by the user), and as of 2.0 they are turned on by default.

Trying to create your own animation in your own view, is (a) inconsistent
with the standard Android UI, (b) not following the user's preference, and
(c) going to interact extremely poorly with the normal activity animations
when they are shown.

There can of course be exceptions to this, for example perhaps the next
activity is translucent in which case there is no animation on it normally
and an animation within the previous activity's UI would not conflict with
it.  But that kind of thing is going to be very, very rare.

Also as of 2.0 there are some new APIs to customize the actual activity
animation for a particular transition...  though again, I would highly
recommend not doing this except under extremely special circumstances, since
it makes your application inconsistent with whatever standard animations the
user sees.

And one other thought on animations: the animations that are shown during UI
transitions have a very strong impact on the user's perception on how they
are moving through the UI and where they are.  Replacing the standard ones
with gratuitous custom ones has a very high chance of harming the user
experience, because it tells the user "something really importantly
different happened here;" if what happened was actually a normal navigation
(such as between two activities), then this can end up being very misleading
and confusing.

On Wed, Dec 2, 2009 at 12:19 AM, tstanly <tsai.sta...@gmail.com> wrote:

> hi all,
>
> I design a rotate animation when activity 1 ends, and then start
> activity 2.
> so my code is:
> =======when activity 1 ends function===============
>
> rotate_animation();  //first call up the animation
>
> Intent i=new Intent();
> i.setClass(activity1.this,activity2.class);
> startActivity(i);
>
> ===========================================
> but this code will not saw the animation totally,
> that's means, the animation will pop up a second then soon activity2
> start!
> but I need the animation play over, then the activity 2 start.
>
>
> so how I do for that requestion?
> I almost use the thread&handler to do, but it wasn't work.
>
> thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to