From e76ef6b8020a917c4408521ee1fbc6318ef955ad Mon Sep 17 00:00:00 2001 From: Denny Date: Thu, 6 Dec 2018 23:20:51 +0100 Subject: [PATCH] Update MainActivity.java Use locale specific formatting for the number. --- .../main/java/com/example/android/hellotoast/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HelloToast/app/src/main/java/com/example/android/hellotoast/MainActivity.java b/HelloToast/app/src/main/java/com/example/android/hellotoast/MainActivity.java index 72bfe597..187e5979 100644 --- a/HelloToast/app/src/main/java/com/example/android/hellotoast/MainActivity.java +++ b/HelloToast/app/src/main/java/com/example/android/hellotoast/MainActivity.java @@ -65,6 +65,6 @@ public void showToast(View view) { public void countUp(View view) { mCount++; if (mShowCount != null) - mShowCount.setText(Integer.toString(mCount)); + mShowCount.setText(NumberFormat.getNumberInstance(Locale.getDefault()).format(mCount)); } }