simply add your locale; for english locale,
return string.format(locale.english,"%s %f %f", anotherstring, doublea, doubleb);
implied default locale in case conversion
#touppercase() without specifying an explicit locale is a common source of bugs. the reason for that is that those methods will use the current locale on the user's device, and even though the code appears to work correctly when you are developing the app, it will fail in some locales. for example, in the turkish locale, the uppercase replacement for i is not i.
if you want the methods to just perform ascii replacement, for example to convert an enum name, call
string#touppercase(locale.us) instead. if you really want to use the current locale, call
when i mentioned the locale with the format, the lint warning just vanished.
cleaning and rebuilding the project should work.
btw, you may want to use
locale.getdefault() to "take care" of texts not written in english.
- Why does Android Lint warn about String.format using default locale when explicitly using Locale.US?
- Why eclipse does not warn about using classes from newer java versions?
- Why does the android apk size differs when built from windows and mac
- Why does eclipse hang when installing an apk to an android emulator?
- Why does M2Eclipse complain about missing artifact when mvn command line doesn't?
- Why does Eclipse warn about Java "unused variables" but javac does not?
- Why does this error occur when I try to run a Junit test-case on the Android emulator?
- Why is my java code only using about 20% of CPU when there is no GUI
- Why does xalan.jar crash eclipse when deploying android app
- Why does my eclipse fail to start android virtual device, when the files are there?
- Why does writing code in onCreate() crash my android program, but the same code works when in onCreateOptionsMenu()?
- Why is debugger not attaching when trying to debug using android emulator and eclipse?
- Why does "../folder/image.jpg" work when the particular jsp is only run using 'right-click-> run on server'
- Why does my android app crash after adding a sound using MediaPlayer
- .apk does not exist error when exporting Android project in Eclipse using android-sdk_r06-mac_86
- Why does Eclipse complain about @Override on interface methods?
- Why does one long string take MORE space than lots of small strings?
- Java "constant string too long" compile error. Only happens using Ant, not when using Eclipse
- When I load ADT why do I receive the error "The Android SDK requires Android Developer Toolkit version XX.X.X or above?"
- Why does Ubuntu 14.04 stick with (old) Eclipse 3.8 when 4.3 is out?
- Why does Eclipse 'filter results from view' when searching?
- How can I check/upgrade Proguard version when using it in Eclipse for Android development?
- Why does heap space run out only when running JUnit tests?
- Android Test Project Directory Structure When Using Eclipse
- Why does eclipse automatically add a java super() method in a constructor when I use the editors code generator?
- Eclipse indexer errors when using STL with Android NDK
- Why when I rename a project in Eclipse does Tomcat not pick up the new resource name?
- Why does Android Eclipse constantly refresh external folders and take forver?
More Query from same tag
- Eclipse, Git pull to existing repository, where are new projects
- g++.exe has stopped working (eclipse)
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener in eclipse
- Java class file not on classpath
- "Invalid Column id" error when counting unique value in Java
- Run Eclipse Java project outside Eclipse
- Which Eclipse version for Egit?
- Integrate linkedin in android app using eclipse
- PDE Build cannot resolve classes in plugins it depends on
- Fire HD 6 + Sencha Touch 2.3.1 + Cordova 3.5.1 + Signed APK = Blank (dark grey) screen
- Use of Alternate Entry Points making an Blackberry application can not be uninstalled
- SWT ExpandListener executes before collapse occurs on Linux
- Cloud Foundry plug-in is not installable into pulse managed eclipse (due to missing joda time osgi bundle)
- Spring Autowire issue with Runnable JAR. Specific to Autowire JPA Repository
- How to see .htaccess files in Eclipse PDT?
- Unable to start flight recorder via JMC 6 within eclipse oxygen (4.7)
- Number guessing program bug?
- Turn off Auto Build in Eclipse CDT directly on files in Workspace metadata
- Eclipse Windows Builder dynamically change content of panel
- How to configure Eclipse to automatically insert import statements for classes with a single package match
- Invalid or corrupt jarFile
- How to declare dependency on Scalding in sbt project?
- What is the easiest way to figure out who wrote/edited this line of code?
- Java validation error from user input
- Access restriction to Notes.jar while developing Lotus Notes Plugin in eclipse
- Threading and Synchronization
- Error when running UIMA example in Ecplise
- When I create Eclipse projects, are the Java/Android dependencies copied again for each project?
- Getting dependency error while installing JetBrains TeamCity in Mars.2 Release (4.5.2)
- Eclipse CDT extend AdapterFactory