Jump to content
  • Advertisement
Sign in to follow this  
nollyj

How can I create this button for android game

This topic is 1499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am new here and new to android game development. I attached a screenshot of the kind of Maths game I want to code in android. This is the condition 

 

Note: I don't want to use any game engine or library 

 

I want to use android SDK ie either to extend a View class or use the SurfaceView.

 

What I have in mind is to create a class that represents button with attributes for Id, Bitmap Image and color and add about 64 instances of the class to a data structure (List). 

 

My questions now is after I rendered the buttons on the canvas. If a user get an answer correct, the buttons click should disappeared from the canvas. I am not sure how best to make the button disappear. My guess is to draw the background color over the button that will disappear.

 

Please if you have a better workflow on how best to create this kind of Maths game, I will really appreciate it.

 

Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement

What have you tried already?

 

If you use a Button or ImageView for the button, or if you extend some View class, you can just call .setVisibility(View.INVISIBLE) or .setVisibility(View.GONE) to make it disappear.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!