Is it possible in Java code to divide two obtained values from two EditText boxes in an android app, and then divide them by each other to create a result?
Pretty much, the consumer of my application will be asked for two DIFFERENT, numerical values to be inputted into each box.
What I want to do with each value is produce a mathematical sum.
E.g.
If the first EditText box contains “22”
and the second EditText contains “11”
I want to be able to take those two values and divide them by each other to produce a value which I can further use.
In this case, that value produced would be 2.
22 / 11 = 2
I’ve already imported these two values into another Class (labeled DataHelper) through className.insert(stringName).
public class DataHelper extends Activity{
public static void insert(String firstFB, String firstRL) {
// TODO Auto-generated method stub
}
}
That’s the Class for DataHelper with the two String values.
I have tried using IEEEremainder(x, y), but I don’t know exactly how to use it since I am a novice at this language.
Can anyone give me some help with this? Any help at all will be appreciated.
Regards,
Mike.
if under standing rigtig you cut due
int one = int value1 / int vlaue2;
but then when you get the value from a edittext you get a string so you need to convert it to a int first int a = new Integer(“value from edittext”).intValue();