You just need to parse the text of your inputs. For example, if one of
your inputs via an EditText named input1, you can store the value as a
variable as follows:

Double f = Double.parseDouble(input1.getText());

Info on parseDouble can be found here:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html#parseDouble(java.lang.String)

Note that parseDouble throws a NumberFormatException, so you should
probably enclose it in a try/catch. Also, it's a good idea to set up
your EditText's to accept only numeric input via android:inputType
which you can read up on here:
http://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType

Best of luck.

Best regards,
Brian Cooley

On Jan 23, 9:56 am, C47 <[email protected]> wrote:
> Hi guys, I'm trying to make my very first application. I have set up
> my UI with four inputs. At the bottom of the screen will be
> calculation results based on those inputs. Can someone tell me or
> maybe point me in the direction of a tutorial/resource for how I call
> my inputs and implement them into a math equation?
>
> The equations are here:http://www.dofmaster.com/equations.html
>
> I'm not asking you to do it for me, I just need a tip on how to get
> started, what the codes are for different operations, etc.
>
> Thanks very much for your time!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to