Ah, I missed that you were saying there was a comma in the decimal
Yes, you have to replace it, no way around that. I ran into that same thing as well. Android doesnt handle that correctly automatically -niko On May 26, 11:11 am, Faust Nijhuis <[email protected]> wrote: > 2010/5/26 niko20 <[email protected]> > > > > > > > Hi, > > > Just do this > > > Double mynewdouble = new Double(<str>); > > > There are built int objects that can take string as a constructor init > > argument. > > > The bad part is now you have a heavyweight object, but it works fine. > > > If you want then you can put it into a normal double: > > > double mydouble = mynewdouble; > > > This is not solving my problem, > > I can solve it with the replace function; > > String aap = "123,55".replace(",", "."); > > But i though there maybe a sort off de-locale function which can read > strings, with with comma or point, and convert it > to a double. > > Faust > > > > > > > > >> How do I transform a string with comma to a string with point. > > > > > By taking 2 seconds to look at the documentation for String. Your > > answer is > > > > right there. Just try looking. > > > > You mean the replace function? > > > > With the format function a double will be translated to a string using > > the > > > Locale setting. > > > Is there a function who can do the other way around, from string to > > double > > > using the locale setting? > > > --------------------------------------------------------------------------- > > ---------------------- > > > > TreKing - Chicago transit tracking app for Android-powered devices > > > >http://sites.google.com/site/rezmobileapps/treking > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Beginners" group. > > > > > NEW! Try asking and tagging your question on Stack Overflow at > > > >http://stackoverflow.com/questions/tagged/android > > > > > To unsubscribe from this group, send email to > > > > [email protected]<android-beginners%2Bunsubscr > > > > [email protected]> > > <android-beginners%[email protected]<android-beginners%252Buns > > [email protected]> > > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-beginners?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Beginners" group. > > > NEW! Try asking and tagging your question on Stack Overflow at > >http://stackoverflow.com/questions/tagged/android > > > To unsubscribe from this group, send email to > > [email protected]<android-beginners%2Bunsubscr > > [email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

