Jump to content

  • Log In with Google      Sign In   
  • Create Account


How can I create this button for android game


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 nollyj   Members   -  Reputation: 102

Like
0Likes
Like

Posted 13 May 2014 - 02:11 AM

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

Attached Thumbnails

  • samplegame.jpg


Sponsor:

#2 Avalander   Members   -  Reputation: 583

Like
1Likes
Like

Posted 14 May 2014 - 12:57 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS