When I run this code on the Android Emulator it shows 2.236328125E-4 instead of 0,00022363224.
What am I doing wrong?
numri=Double.parseDouble(number2.getText().toString());
kalkulimi=(numri* 0.229);
tv.setText(Double.toString(kalkulimi* 0.0009765625));
This is due to the way Android (and java in general) internally stores numbers. If you’re after a specific format, I strongly suggest that you use
NumberFormat: