I'd like to point out that I'm fairly new to Android game development. I have tried few ways of programming games and found both working, but both of them had their own advantages. So I'd like to know which way is better/common way of doing it. For example if we are trying to make jigsaw puzzle game we need many puzzle piece objects that interact with each other and respond to touch events.

**Way 1:**

As I learned from java, if you have many objects that behave same way you should create class and then create object of that class. I tried this with game project and created class "PuzzlePiece" which extended ImageView. Then in my main program I added them to my layout and moved them from main activity. This was pretty complicated and slow. And also it didn't feel like the right way to do that.

**Way 2:**

I added my game objects as components (e.g ImageView, ImageButton, Custom Layout with image background). This way I had better control over them, and it was easier to have many objects at the same time and have them interact with each other. But this method was very slow, and also didn't feel like the right way to do it.

**Way 3:**

I added SurfaceView in Activity and draw all my objects on canvas with draw() method. This method was much faster, but this way I had less controll over my objects. For example drawing many objects on canvas and having them all respond to touch events or interact with each other was harder to achieve.

Is there some other way that I have missed or is one of my methods close to the right way of doing this?