From bd2dce9d96c57c8608b1c198663a37968000abd9 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Thu, 5 Apr 2018 20:08:26 +0300 Subject: [PATCH] Add animations for wikivoyage fragments --- .../plus/wikivoyage/WikivoyageBaseDialogFragment.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageBaseDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageBaseDialogFragment.java index 1f4c4a9971..813666022c 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageBaseDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/WikivoyageBaseDialogFragment.java @@ -36,9 +36,12 @@ public class WikivoyageBaseDialogFragment extends BaseOsmAndDialogFragment { public Dialog onCreateDialog(Bundle savedInstanceState) { int themeId = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme_LightStatusBar; Dialog dialog = new Dialog(getContext(), themeId); - if (Build.VERSION.SDK_INT >= 21) { - Window window = dialog.getWindow(); - if (window != null) { + Window window = dialog.getWindow(); + if (window != null) { + if (!getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get()) { + window.getAttributes().windowAnimations = R.style.Animations_Alpha; + } + if (Build.VERSION.SDK_INT >= 21) { window.setStatusBarColor(getResolvedColor(getStatusBarColor())); } }