Q:

Android: Button fly in effect

I was wondering if Android is capable of animate a fly in effect when user starts the application for a button.
It feels wrong to animate it on the UI thread which probably just hang the app.
So is there any API or so for doing a fly in effect?
Cheers

A:

Yes, you can animate the pixels of the button even in pure xml layout (or in code of course), check the android Animation stuff. For custom animation, define your animation xml in the customary /res/anim .
For slide in I suggest animating X with a translate animation. Or just use the built in slide animation.
Simple case like this:
//load anim from resources
Animation anim = AnimationUtils.loadAnimation(this, R.anim.my_anim);
button.startAnimation(anim);

So place the button where you would like it to be an then add the animation (as the button click events will be where you set it to be not where the animation is showing it).
A translate animation in xml can look something like this, customize it to your needs:
<translate xmlns:android="http://schemas.android.com/apk/res/android"
 android:fromXDelta="300%" android:toXDelta="0%"  android:duration="4000"  />

