I’ve been messing around with Android development.
I made a simple form that has two fields for numbers, and when you press the Calculate button, it multiplies them.
What I would like to do is when I press Calculate to open another form, and pass that multiplied number to it to display it.
I’m really not sure how to do this though, the whole xml and findViewById thing is pretty different from what I’ve done before. When I started the project in Eclipse, the main.xml and strings.xml was created for me.
I tried googling around but I just find tutorials using one form
Could someone point me to a good tutorial for this, or explain how to create a new form, create/open it, and pass some information to it?
Thanks
To start a new Activity (what you’re calling Form), you need to create an intent. To pass data to that activity, you can bind “extras” into the intent:
Then in the new activity, you can retrieve those values: