diff --git a/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java b/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java index 95bccefeec..28fd3ed167 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java +++ b/OsmAnd/src/net/osmand/plus/helpers/ColorDialogs.java @@ -98,7 +98,9 @@ public class ColorDialogs { if ((0xFF000000 & color) == 0xFF000000) { return "#" + Integer.toHexString(color & 0x00FFFFFF); //$NON-NLS-1$ } else { - return "#" + Integer.toHexString(color); //$NON-NLS-1$ + private final static String ZEROES = "000000"; + String c = Integer.toHexString(color); + return "#" + c.length() <= 6 ? ZEROES.substring(c.length()) + c : c; //$NON-NLS-1$ } } } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java index 65e1592b7b..e3a497a36c 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java @@ -271,7 +271,7 @@ public class SelectedGPXFragment extends OsmAndListFragment { final TIntArrayList list = new TIntArrayList(); final Spinner colorSpinner = (Spinner) view.findViewById(R.id.ColorSpinner); - ColorDialogs.setupColorSpinner(getActivity(), getGpx().getColor(), colorSpinner, list); + ColorDialogs.setupColorSpinner(getActivity(), getGpx().getColor(0), colorSpinner, list); final Spinner sp = (Spinner) view.findViewById(R.id.Spinner);