Small fixes
This commit is contained in:
parent
1cd54ff9bd
commit
3cfd3d67ce
3 changed files with 4 additions and 11 deletions
|
@ -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")
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue