I have BMI calculator app that takes some input and puts it in "EditText". Here is what I am trying to do:
If the input is
String weight = editText.getText().toString();
Cant you convert the string to an integer and take modulus 100 to the cms and divide by 100 to get in meters?
You can convert the String weight to int like this
int wgt = Integer.parseInt(weight);
Then separating meters and centimetres.
int mtrs = wgt / 100; int cms = wgt % 100;
Then combining both
String result = mtrs + "." + cms;