tags:

views:

87

answers:

1

I give the description of project My project is like calculator project I have one editbox and 10 buttons in my layout file. i need the logic when i click on particular button editbox will be clear but its value will be stored,so i will use it in the next calculation. so please give me the solution.

+1  A: 

Hii ,

Design the buttons using an XML file and use that to put them in your layout . Then implement the onCLickListener of the button . Inside the onClickListener set the text based on the id of the button and store the value where u would like to . Display it momentarily and then clear the edittext by clearing the text field . Calculate the expression when the user hits the '=' button .

I hope this works fine ... :)

ravi