Java tutorial
//package com.java2s; import android.widget.EditText; public class Main { public static double readDoubleFromEditText(EditText mEditText) { String payString = mEditText.getText().toString(); double payDouble = 0.0; if (payString.length() > 0) payDouble = Double.parseDouble(payString); return payDouble; } }