Converting String to Double in Android

前端 未结 8 661
感情败类
感情败类 2020-12-09 02:29

Trying to get double values from an EditText and manipulate them before passing them to another Intent. Not using primitive data type so I can use toString methods.

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 03:09

    What about using the Double(String) constructor? So,

    protein = new Double(p);
    

    Don't know why it would be different, but might be worth a shot.

提交回复
热议问题