Small fixes

This commit is contained in:
Alexey Kulish 2016-02-27 18:26:41 +03:00
parent 1cd54ff9bd
commit 3cfd3d67ce
3 changed files with 4 additions and 11 deletions

View file

@ -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")

View file

@ -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 {

View file

@ -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)