I originally called String.format
this way:
return String.format("%s %f %f", anotherString, doubleA, doubleB);
Which made Android Lint generate this warning:
Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
So I changed it to use Locale.US
explicitly, based on what I read at http://developer.android.com/reference/java/util/Locale.html under the "Be wary of the default locale" section:
return String.format(Locale.US, "%s %f %f", anotherString, doubleA, doubleB);
Why does Android Lint still generate the same warning? I have to clean the project in Eclipse to get rid of it, when most warnings just disappear as soon as the offending line is fixed. I'm not sure if I'm doing something wrong or not.
Cleaning and rebuilding the project should work.
BTW, you may want to use Locale.getDefault()
to "take care" of texts not written in english.