[android-beginners] string to double

2010-05-25 Thread Faust Nijhuis
Hello,

Is there an function to change an string with a comma to a double.

example code;

stripline1.Z0 = 123.45 (with point)

DecimalFormat df = new DecimalFormat(#.##);
strip_Z0.setText(df.format(stripline1.Z0));

The value in the textEdit entry will be with a comma or point, depending on
the locale setting.

If  I convert the string, with comma, directly to a double I get a force
close.

How do I transform a string with comma to a string with point.

Faust

-- 
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
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] string to double

2010-05-25 Thread TreKing
On Tue, May 25, 2010 at 3:22 PM, Faust Nijhuis faustnijh...@gmail.comwrote:

 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.

-
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
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en