Add animations for wikivoyage fragments
This commit is contained in:
parent
f0b146db77
commit
bd2dce9d96
1 changed files with 6 additions and 3 deletions
|
@ -36,9 +36,12 @@ public class WikivoyageBaseDialogFragment extends BaseOsmAndDialogFragment {
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
int themeId = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme_LightStatusBar;
|
int themeId = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme_LightStatusBar;
|
||||||
Dialog dialog = new Dialog(getContext(), themeId);
|
Dialog dialog = new Dialog(getContext(), themeId);
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
|
||||||
Window window = dialog.getWindow();
|
Window window = dialog.getWindow();
|
||||||
if (window != null) {
|
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()));
|
window.setStatusBarColor(getResolvedColor(getStatusBarColor()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue