diff --git a/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java index 307cfb3bbe..7ee7664f4c 100644 --- a/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/base/MenuBottomSheetDialogFragment.java @@ -423,7 +423,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra private LayerDrawable createBackgroundDrawable(@NonNull Context ctx, @DrawableRes int shadowDrawableResId) { Drawable shadowDrawable = ContextCompat.getDrawable(ctx, shadowDrawableResId); - Drawable[] layers = new Drawable[] {shadowDrawable, getColoredBg(ctx)}; + Drawable[] layers = new Drawable[]{shadowDrawable, getColoredBg(ctx)}; return new LayerDrawable(layers); } @@ -434,6 +434,21 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra return !app.getSettings().isLightContent(); } + private void testShadowOn() { + buttonsShadow.setVisibility(View.VISIBLE); + buttonsShadow.animate() + .alpha(0.8f) + .setDuration(200) + .setListener(null); + } + + private void testShadowOff() { + buttonsShadow.animate() + .alpha(0f) + .setDuration(200); + + } + private void setupScrollShadow(View view) { final View scrollView; if (useScrollableItemsContainer()) { @@ -446,7 +461,11 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra @Override public void onScrollChanged() { boolean scrollToBottomAvailable = scrollView.canScrollVertically(1); - AndroidUiHelper.updateVisibility(buttonsShadow, scrollToBottomAvailable); + if (scrollToBottomAvailable) { + testShadowOn(); + } else { + testShadowOff(); + } } }); } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java index d6e82218fe..bc0a28c2f1 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java @@ -182,11 +182,11 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca } private void testShadowOn() { -// buttonsShadow.setAlpha(0f); +// buttonsShadow.setAlpha(0.3f); buttonsShadow.setVisibility(View.VISIBLE); buttonsShadow.animate() - .alpha(1f) - .setDuration(100) + .alpha(0.8f) + .setDuration(200) .setListener(null); } @@ -194,7 +194,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca // buttonsShadow.setAlpha(0.5f); buttonsShadow.animate() .alpha(0f) - .setDuration(100); + .setDuration(200); }