diff --git a/OsmAnd/res/layout/track_appearance.xml b/OsmAnd/res/layout/track_appearance.xml index 089e1f174d..0be92d2bb0 100644 --- a/OsmAnd/res/layout/track_appearance.xml +++ b/OsmAnd/res/layout/track_appearance.xml @@ -37,7 +37,7 @@ android:layout_height="wrap_content"> + android:orientation="vertical" + android:paddingBottom="@dimen/content_padding"> 0 && bottomContainer.getForeground() == null) { bottomContainer.setForeground(shadowIcon); } + updateButtonsShadow(); } }); } + private void updateButtonsShadow() { + boolean scrollToBottomAvailable = getBottomScrollView().canScrollVertically(1); + AndroidUiHelper.updateVisibility(buttonsShadow, scrollToBottomAvailable); + } + + private void updateColorItems() { + updateAppearanceIcon(); + if (trackWidthCard != null) { + trackWidthCard.updateItems(); + } + } + private void saveTrackInfo() { GPXFile gpxFile = selectedGpxFile.getGpxFile(); @@ -537,19 +559,7 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement } private void saveGpx(final GPXFile gpxFile) { - new SaveGpxAsyncTask(gpxFile, new SaveGpxAsyncTask.SaveGpxListener() { - @Override - public void gpxSavingStarted() { - - } - - @Override - public void gpxSavingFinished(Exception errorMessage) { - if (errorMessage == null) { - app.showShortToastMessage(R.string.shared_string_track_is_saved, Algorithms.getFileWithoutDirs(gpxFile.path)); - } - } - }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new SaveGpxAsyncTask(gpxFile, null).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } private void setupCards() { diff --git a/OsmAnd/src/net/osmand/plus/track/TrackColoringCard.java b/OsmAnd/src/net/osmand/plus/track/TrackColoringCard.java index ff21fa3f18..79a7107ca8 100644 --- a/OsmAnd/src/net/osmand/plus/track/TrackColoringCard.java +++ b/OsmAnd/src/net/osmand/plus/track/TrackColoringCard.java @@ -281,6 +281,7 @@ public class TrackColoringCard extends BaseCard implements ColorPickerListener { public void onColorSelected(int prevColor, int newColor) { if (prevColor == INVALID_VALUE && customColors.size() < 6) { customColors.add(newColor); + trackDrawInfo.setColor(newColor); } else if (!Algorithms.isEmpty(customColors)) { int index = customColors.indexOf(prevColor); if (index != INVALID_VALUE) { diff --git a/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java index 2f7cf6cb5f..59a249000a 100644 --- a/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/layers/GPXLayer.java @@ -887,12 +887,12 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM @Override public boolean disableSingleTap() { - return false; + return isInTrackAppearanceMode(); } @Override public boolean disableLongPressOnMap() { - return false; + return isInTrackAppearanceMode(); } @Override