I am running a frame by frame animation using sequential images in a surface view. I am declaring the activity by :
public class myView extends SurfaceView implements SurfaceHolder.Callback
{
public myView (Context paramContext, Listener paramListener)
{
super(paramContext);
getHolder().addCallback(this);
//Some Code
}
public void doDraw(Canvas paramCanvas, int imgpos)
{
// Animation from image source using InputStream
}
public boolean onTouchEvent(MotionEvent paramMotionEvent)
{
return super.onTouchEvent(paramMotionEvent);
}
public void surfaceChanged(SurfaceHolder paramSurfaceHolder, int paramInt1, int paramInt2, int paramInt3)
{
//Some Code
}
public void surfaceCreated(SurfaceHolder paramSurfaceHolder)
{
//Some code
}
public void surfaceDestroyed(SurfaceHolder paramSurfaceHolder)
{
//Some Code
}
}
Now I am trying to implement a Listener for the Animation End event for the above using the following code :
public static abstract interface Listener
{
public abstract void onAnimationEnd();
}
I am stuck up with the above code and can anyone suggest me how I can implement this interface in another activity, so that I can find out that the current animation is over in the Surface View Activity.
Thanks in Advance,
Tim