Skip to content

Commit

Permalink
fixed #2
Browse files Browse the repository at this point in the history
  • Loading branch information
NandanDesai committed Apr 23, 2020
1 parent 4acf337 commit 7dcd8b9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
import android.os.Build;
import android.os.Bundle;
import android.os.SystemClock;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
Expand All @@ -38,7 +38,9 @@ protected void onCreate(Bundle savedInstanceState) {
}

private static String getFormattedDataMeasure(long bytes) {
DecimalFormat decimalFormat = new DecimalFormat("#.#");
Locale locale = new Locale("en", "UK");
DecimalFormat decimalFormat = (DecimalFormat) NumberFormat.getNumberInstance(locale);
decimalFormat.applyPattern("#.#");
String dataFormat = bytes + " B";
float speed = 0;
if (bytes >= 1024) {
Expand Down

0 comments on commit 7dcd8b9

Please sign in to comment.