Reputation: 43
I am trying to make a fairly simple Android game. I am making a custom view: I am not using any buttons, rather, I am painting pixels on screen that represent buttons. The idea is that I have 3 screens:
The main menu has two "locations" to click on: one that says Play (via painted pixels) and another that says Instructions.
I am confused as to how these should be implemented. Right now, I have a Main activity that sets the content view to the Main screen (extends View) but I am confused as to how to go from that Main screen (View) to the Play or Instructions screen. I have read up on View, Activities and SurfaceView but without any luck in understanding.
Does anyone have any examples (with proper programming practices) to make a view interactive and show another View (potentially Activity that creates a View?) Thanks!
Upvotes: 1
Views: 1081
Reputation: 4653
What you need are some basic Android game development tutorials. To get started, this short tutorial is well-arranged and covers a Main-Screen, which leads to a Game-Screen. It will definitely help you out to get started. I personally also like video-tutorials, that's why I would recommend this series of tutorials which is suitable for beginners, too. Finally this page shows a lot of Android gaming tutorials. That are my personal favorits as it comes to gaming tutorials for beginners, but you will find a lot of stuff out there in the web. Have fun!
Upvotes: 3