diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java index 81b5166d85..649f6d8787 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/editors/PointEditorFragment.java @@ -167,6 +167,10 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment { descriptionEdit.setHint(R.string.access_hint_enter_description); } + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, view); + } + return view; } @@ -234,11 +238,6 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment { return R.color.status_bar_color_light; } - @Override - protected boolean isFullScreenAllowed() { - return false; - } - private void hideKeyboard() { FragmentActivity activity = getActivity(); if (activity != null) { diff --git a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java index fa2901b583..e81d4fbfda 100644 --- a/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java +++ b/OsmAnd/src/net/osmand/plus/profiles/EditProfilesFragment.java @@ -2,6 +2,7 @@ package net.osmand.plus.profiles; import android.annotation.SuppressLint; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -174,12 +175,11 @@ public class EditProfilesFragment extends BaseOsmAndFragment { } }); - return mainView; - } + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, mainView); + } - @Override - protected boolean isFullScreenAllowed() { - return false; + return mainView; } @Override diff --git a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java index 998a1464a1..a64cc46979 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/QuickActionListFragment.java @@ -3,6 +3,7 @@ package net.osmand.plus.quickaction; import android.content.DialogInterface; import android.content.res.Resources; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -24,6 +25,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import net.osmand.AndroidUtils; import net.osmand.plus.R; import net.osmand.plus.UiUtilities; import net.osmand.plus.activities.MapActivity; @@ -73,6 +75,10 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick } }); + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(getContext(), view); + } + return view; } @@ -145,11 +151,6 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick quickActionRegistry.setUpdatesListener(null); } - @Override - protected boolean isFullScreenAllowed() { - return false; - } - @Override public int getStatusBarColorId() { return isLightContent ? R.color.status_bar_color_light : R.color.status_bar_color_dark; diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index ec9863482e..af4b019860 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -178,6 +178,9 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl createToolbar(inflater, view); setDivider(null); view.setBackgroundColor(ContextCompat.getColor(app, getBackgroundColorRes())); + if (Build.VERSION.SDK_INT >= 21) { + AndroidUtils.addStatusBarPadding21v(app, view); + } } return view; } @@ -250,9 +253,6 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId)); } } - if (activity instanceof MapActivity) { - ((MapActivity) activity).exitFromFullScreen(getView()); - } } } } @@ -271,9 +271,6 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl if (!(activity instanceof MapActivity) && statusBarColor != -1) { activity.getWindow().setStatusBarColor(statusBarColor); } - if (activity instanceof MapActivity) { - ((MapActivity) activity).enterToFullScreen(); - } } } }