Merge pull request #4358 from osmandapp/disable_animations

Disable animations
This commit is contained in:
Alexey 2017-08-30 10:43:29 +03:00 committed by GitHub
commit 6785421ee5
3 changed files with 18 additions and 8 deletions

View file

@ -1251,13 +1251,17 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents {
return false;
}
int slideInAnim = R.anim.slide_in_bottom;
int slideOutAnim = R.anim.slide_out_bottom;
int slideInAnim = 0;
int slideOutAnim = 0;
if (!mapActivity.getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get()) {
slideInAnim = R.anim.slide_in_bottom;
slideOutAnim = R.anim.slide_out_bottom;
if (menu.isExtended()) {
slideInAnim = menu.getSlideInAnimation();
slideOutAnim = menu.getSlideOutAnimation();
}
}
MapContextMenuFragment fragment = new MapContextMenuFragment();
fragment.centered = centered;

View file

@ -114,8 +114,13 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi
MapMultiSelectionMenu menu = mapActivity.getContextMenu().getMultiSelectionMenu();
int slideInAnim = menu.getSlideInAnimation();
int slideOutAnim = menu.getSlideOutAnimation();
int slideInAnim = 0;
int slideOutAnim = 0;
if (!mapActivity.getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get()) {
slideInAnim = menu.getSlideInAnimation();
slideOutAnim = menu.getSlideOutAnimation();
}
MapMultiSelectionMenuFragment fragment = new MapMultiSelectionMenuFragment();
menu.getMapActivity().getSupportFragmentManager().beginTransaction()

View file

@ -345,7 +345,8 @@ public class AnimateDraggingMapThread {
}
public void startZooming(final int zoomEnd, final double zoomPart, final boolean notifyListener){
final float animationTime = ZOOM_ANIMATION_TIME;
boolean doNotUseAnimations = tileView.getSettings().DO_NOT_USE_ANIMATIONS.get();
final float animationTime = doNotUseAnimations ? 0 : ZOOM_ANIMATION_TIME;
startThreadAnimating(new Runnable(){
@Override
public void run() {