Tuesday, December 27, 2011

[android-developers] Re: Android custom ImageView fade animation

On 28 дек, 00:56, Seb <stsiop...@googlemail.com> wrote:
> Hmm I kind of understand... are you able to provide any code or psuedo
> code though to show how it would fit together?
> On Dec 25, 5:08 pm, AlexBonel <bonela...@gmail.com> wrote:

For example:

public class MyActivity extends Activity {

private GameView mGameView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
// Deffinition of your Activity
......
// somewhere (for example in some View.OnXXXListener
implementation)
runOnUiThread(
new Runnable() {

@Override
public void run() {

mGameView.startAnimation(AnimationUtils.loadAnimation(MyActivity.this,
R.anim.my_animation));
}
}
);
}
}

Is it clear?

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment