Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Android Game:

I am developing a Ludo game for android. For UI, I used xml and for game moves like displaying Ludo board, players and dice I have used java code in which I draw Bitmap images using canvas.drawBitmap() function.
The classes I am using in my code are;

- mainActvity
- GameView
- Players
- GameLoopThread

Now in mainActivity I used xml to display User Interface to start game. In GameView class I used java code using drawBitmap() function to display Luddo board and dice etc. Now I want to add a button on the GameView at ludo board so that when this button is pressed user gets the main menu on the screen. But am unable add a button in GameView.

For this purpose I displayed a button in form of an image an tried to destroy GameView when user clicks on the location of that image. But I am also unable to make it possible. While click is working fine on dice and players of the game, they move around the locations of objects when clicked on their turn.
Please help me out so that I can add a button in the GameView class and display it along with other Bitmap images.
Posted
Updated 5-Oct-11 0:01am
v2
Comments
Slacker007 5-Oct-11 6:03am    
Edit: removed the "please help" bit from the title and made it a little more descriptive. "please help" seams to bring a negative response here more than a positive one. cheers.
Rizwan Sohaib 5-Oct-11 7:34am    
well..ok... but can you help me out..?
Slacker007 5-Oct-11 7:45am    
I only edited your question. I don't know anything about Android development. So I am unable to answer your question properly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900