diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 40575ce14e..0d1b4a3409 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -9,6 +9,7 @@ import android.os.Build; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; +import android.support.v4.view.ViewCompat; import android.support.v7.widget.Toolbar; import android.util.TypedValue; import android.view.Gravity; @@ -1291,16 +1292,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis } } - @SuppressLint("NewApi") private void setTranslationY(View v, int y) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { - v.setTranslationY(y); - } else { - TranslateAnimation anim = new TranslateAnimation(0, 0, y, y); - anim.setFillAfter(true); - anim.setDuration(0); - v.startAnimation(anim); - } + ViewCompat.setTranslationY(v, y); } @SuppressLint("NewApi") diff --git a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java index 112b5fd6f6..626a52053f 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java @@ -832,7 +832,7 @@ public class MapMarkerDialogHelper { } } - if (markersHelper.isStartFromMyLocation() && prevMyLoc == null && myLoc != null) { + if (selectionMode && markersHelper.isStartFromMyLocation() && prevMyLoc == null && myLoc != null) { if (helperCallbacks != null) { helperCallbacks.showMarkersRouteOnMap(); } else { diff --git a/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java index afc5588c2f..7350e6cdb4 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/DynamicListView.java @@ -457,7 +457,7 @@ public class DynamicListView extends ObservableListView { int switchViewNewTop = switchView.getTop(); int delta = switchViewStartTop - switchViewNewTop; - switchView.setTranslationY(delta); + ViewCompat.setTranslationY(switchView, delta); if (android.os.Build.VERSION.SDK_INT < 12) { ViewCompat.animate(switchView)