// Float and double is working with this code
float average = 9.333333333f;
double average_d = 9.55555555;
tv.setText(new DecimalFormat("##.##").format(average));
tv.setText(new DecimalFormat("##.##").format(average_d));
Last active
March 26, 2020 08:36
-
-
Save kuraydev/031fe1813d4923e3b680 to your computer and use it in GitHub Desktop.
How to set a decimal value formatting into a TextView on Android? Article: https://freakycoder.com/android-notes-14-decimal-value-formatting-31cbb6a3466e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment