Original Post
Currently, I'm looking at a tutorial for SurfaceView and multithreading implementation here. I do know that SurfaceView requires a Canvas in its onDraw().
Whenever I think of Canvas, I tend to think of my experiences with programming with Java AWT Canvas, albeit beginner's level. My concept is that I put my experiences to good use from Java to Android, by re-implementing my methods into the Android Canvas.
Some books of reference (source) said that Android Canvas and Java AWT Canvas can be seen as the same, and continued mentioning how all Canvas concepts can be used along with Android Canvas, one way or another.
Now, the keys of the concept: By implementing Runnable to a class extending Canvas, and using that class in SurfaceView.onDraw().
Is this preferred? Or I may be seeing things in hindsight? Thanks in advance.
Whenever I think of Canvas, I tend to think of my experiences with programming with Java AWT Canvas, albeit beginner's level. My concept is that I put my experiences to good use from Java to Android, by re-implementing my methods into the Android Canvas.
Some books of reference (source) said that Android Canvas and Java AWT Canvas can be seen as the same, and continued mentioning how all Canvas concepts can be used along with Android Canvas, one way or another.
Now, the keys of the concept: By implementing Runnable to a class extending Canvas, and using that class in SurfaceView.onDraw().
Is this preferred? Or I may be seeing things in hindsight? Thanks in advance.