MPrenassi / gpslogger

Automatically exported from code.google.com/p/gpslogger
0 stars 1 forks source link

KML export for german version faulty #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. export a kml file in german android version
2.
3.

What is the expected output? What do you see instead?
coordinates should be in format xx.xxxxx instead they are xx,xxxxx

What version of the product are you using? On what operating system?
android 1.5, german version

Please provide any additional information below.

Original issue reported on code.google.com by fodia...@gmail.com on 1 Apr 2010 at 2:45

GoogleCodeExporter commented 8 years ago
This problem is in samsung galaxy s2 too. Im in Latvia and phone interface is 
set to Latvian. android version 2.3.3, krenel 2.6.35.7

Original comment by imoJ...@gmail.com on 11 Jul 2012 at 7:22

GoogleCodeExporter commented 8 years ago
I fixed myself:
    private final DecimalFormatSymbols decimalSymbol = new DecimalFormatSymbols(Locale.getDefault()); //added 2012.07.11

    private final DecimalFormat sevenSigDigits = new DecimalFormat("0.#######");

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //added 2012.07.11
        if (sevenSigDigits.getDecimalFormatSymbols().getDecimalSeparator() == ',')
        {
            decimalSymbol.setDecimalSeparator('.');
            sevenSigDigits.setDecimalFormatSymbols(decimalSymbol);
        }
        //end 2012.07.11

Original comment by imoJ...@gmail.com on 11 Jul 2012 at 8:36