Is there any way to Zoom-in and Zoom-out an ImageView
continuously in Android. I tried using the below code, but only one of the Zoom function is working.
use this instead of thread
zoomin.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation arg0) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationRepeat(Animation arg0) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationEnd(Animation arg0) {
bgImage.startAnimation(zoomout);
}
});
and
zoomout.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation arg0) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationRepeat(Animation arg0) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationEnd(Animation arg0) {
bgImage.startAnimation(zoomin);
}
});