Java tutorial
//package com.java2s; import android.text.Editable; public class Main { public static double parseDouble(Editable text) { return parseDouble(text.toString()); } public static double parseDouble(String number) { try { return Double.parseDouble(number); } catch (Exception e) { return 0.0; } } }