thanks for suggetion.... actually i want to run multiple animation in one activity(Screen).. for that i tried this code but animation is not running: package com.anim;
import android.app.Activity; import android.graphics.drawable.AnimationDrawable; import android.os.Bundle; import android.view.animation.Animation; import android.widget.Button; import android.widget.ImageView; public class AnimActivity extends Activity implements Runnable { ImageView img, img2; Animation animation; AnimationDrawable FrameAnimation; Button button; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); onStart(); button=(Button)findViewById(R.id.button1); img=(ImageView)findViewById(R.id.imageView1); img2=(ImageView)findViewById(R.id.imageView2); // button.setOnClickListener(this); // onStart(); Thread th= new Thread() { // Animation(); public void animation() { // TODO Auto-generated method stub FrameAnimation=(AnimationDrawable)img2.getBackground(); FrameAnimation.setOneShot(true); FrameAnimation.start(); } public void frame() { FrameAnimation = (AnimationDrawable)img.getBackground(); FrameAnimation.setOneShot(true); FrameAnimation.start(); } public void run() { // TODO Auto-generated method stub img.setBackgroundResource(R.drawable.frame_animation); frame(); img2.setBackgroundResource(R.drawable.frame_play); animation(); } }; th.start(); } public void run() { // TODO Auto-generated method stub } } ....................................................................................................................................................................................................................... this code is not showing any error but animation is also not working; -- 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