Konwertuj ciąg na podwójne studio z Androidem
String s;
DecimalFormat dF = new DecimalFormat("0.00");
Number num = dF.parse(s);
double final = num.doubleValue();
Happy Owl
String s;
DecimalFormat dF = new DecimalFormat("0.00");
Number num = dF.parse(s);
double final = num.doubleValue();
double total = a;
String total2 = String.valueOf(total);
a = variabile inserita dall’utente nel plain text
Double lat;
String lat_str = "17.456174";
try {
lat = Double.parseDouble(lat_str);
}catch (NumberFormatException e) {
//lat_string does not contain valid double value
}
double a = Double.parseDouble(editText.getText().toString());
Double.toString()