Android: How to set the contents of a Edit text from a Button click?

Posted by primal on Stack Overflow See other posts from Stack Overflow or by primal
Published on 2010-04-23T15:16:52Z Indexed on 2010/04/23 15:33 UTC
Read the original article Hit count: 197

Filed under:

Hi,

I am a rookie to android. I am thinking of implementing a simple calculator in android to get a hold of the basics in android. I want to display a keypad with numbers and mathematical operations and when the user presses the keys the corresponding number is displayed in edit text. I tried using gettext() and updating the contents of edit text but it shows just the contents of pressed button. Also how do I read the contents of button so as to do mathematical operations in code? Any help would be much appreciated.

regards,

Primal

© Stack Overflow or respective owner

Related posts about android