I am implementing a custom surface view, which is called from other activity by setContentView(new SurfaceViewClass(Context))
. This class is extending the surfaceView
. In the Draw()
method which I have added in the surface view, I am displaying an animation that gets triggered, say, every 200 milliseconds, which means that the surfaceview
thread gets triggered every 200 msecs.
My requirement is I want to add a button at the bottom of the animation that can respond to events when user has pressed it. How it is possible to do this?
Thank you!