From d1014f7b1f5243a51aa4a8feec7ce64fdb61adea Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 10 May 2017 13:51:01 +0200 Subject: [PATCH] fix "Number formatting does not take into account locale settings." lint says "Consider using String.format instead." --- .../java/org/fdroid/fdroid/views/RepoDetailsActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/fdroid/fdroid/views/RepoDetailsActivity.java b/app/src/main/java/org/fdroid/fdroid/views/RepoDetailsActivity.java index 4a58aeac2..736655d2e 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/RepoDetailsActivity.java +++ b/app/src/main/java/org/fdroid/fdroid/views/RepoDetailsActivity.java @@ -27,7 +27,6 @@ import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; - import org.fdroid.fdroid.FDroidApp; import org.fdroid.fdroid.NfcHelper; import org.fdroid.fdroid.NfcNotEnabledActivity; @@ -39,6 +38,8 @@ import org.fdroid.fdroid.data.Repo; import org.fdroid.fdroid.data.RepoProvider; import org.fdroid.fdroid.data.Schema.RepoTable; +import java.util.Locale; + public class RepoDetailsActivity extends ActionBarActivity { private static final String TAG = "RepoDetailsActivity"; @@ -323,7 +324,7 @@ public class RepoDetailsActivity extends ActionBarActivity { name.setText(repo.name); int appCount = RepoProvider.Helper.countAppsForRepo(this, repoId); - numApps.setText(Integer.toString(appCount)); + numApps.setText(String.format(Locale.getDefault(), "%d", appCount)); setupDescription(repoView, repo); setupRepoFingerprint(repoView, repo);