سؤال

can someone please help me, I am trying to do a simple quadratic equation app, and I can't figure out how to make the double variables get the value from the text inputed in the Edit text field

هل كانت مفيدة؟

المحلول

Simply take the string value from the EditText and parse it to a Double.

double value = Double.parseDouble(myEditText.getText().toString());
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top