From 53b091a47f8c9cecee1cba95a52f333162defde5 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Thu, 13 Jul 2017 14:42:29 +0300 Subject: [PATCH] Fix scrolling --- .../plus/myplaces/SplitSegmentFragment.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java index 5a98cc1977..231e4ef379 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java @@ -145,15 +145,13 @@ public class SplitSegmentFragment extends OsmAndListFragment { previousYPos = currentYPos; } - if (previousYPos - currentYPos < headerView.getHeight()) { - float yTranslationToSet = headerView.getTranslationY() + (previousYPos - currentYPos); - if (yTranslationToSet < 0 && yTranslationToSet > -headerView.getHeight()) { - headerView.setTranslationY(yTranslationToSet); - } else if (yTranslationToSet < -headerView.getHeight()) { - headerView.setTranslationY(-headerView.getHeight()); - } else if (yTranslationToSet > 0) { - headerView.setTranslationY(0); - } + float yTranslationToSet = headerView.getTranslationY() + (previousYPos - currentYPos); + if (yTranslationToSet < 0 && yTranslationToSet > -headerView.getHeight()) { + headerView.setTranslationY(yTranslationToSet); + } else if (yTranslationToSet < -headerView.getHeight()) { + headerView.setTranslationY(-headerView.getHeight()); + } else if (yTranslationToSet > 0) { + headerView.setTranslationY(0); } previousYPos = currentYPos;