I'm not sure how to fix this problem. I have a spinner. When a certain choice is selected then whatever is in the text field (number) I want to use that value for a specific method.
In Main:
EditText temp;
temp = (EditText)findViewById(R.id.editText);
public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
{
String choice = parent.getSelectedItem().toString();
Double value = Double.parseDouble(temp.getText().toString());
}
Everything works fine before I try to convert the temp into a double, it crashes the application. Any help will be appreciated.
I AM NEW TO ANDROID STUDIO.