I'm currently using the following line of code to get the value from an edittext:
double value = Double.valueOf(editText.getText().toString().trim());
This is inside an onclick method. The app I'm developing crashes every time that button is clicked, and I've commented every possible variation of lines in the method and figured out that it's this line of code that causes it to crash. I have no idea why this is happening, but is there an alternative to the same? Parsing it as double didn't work either.