@Override
        public void onItemSelected(final AdapterView<?> parent, final View view, final int pos, final long id) {
            // Ignore first call, which comes from onCreate()
            if (currentFormat != null) {

                // Start new format with an acceptable value: either the current one
                // entered by the user, or our current position.
                if (!areCurrentCoordinatesValid(false) && !supportsNullCoordinates()) {
                    gp = currentCoords();
                }
            }

            currentFormat = CoordInputFormatEnum.fromInt(pos);
            Settings.setCoordInputFormat(currentFormat);
            updateGUI();

            // select first field
            orderedInputs.get(0).requestFocus();
        }
Max lengths, depending on currentFormat
<br>
formatPlain = disabled
DEG MIN SEC SUB
formatDeg 2/3 5 - -
formatMin 2/3 2 3 -
formatSec 2/3 2 2 3
main/src/main/java/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java