Merge pull request #8465 from osmandapp/GrayBarBottomFix

Fix "gray bar at the bottom of the screen"
This commit is contained in:
vshcherb 2020-02-14 15:32:50 +01:00 committed by GitHub
commit 8d4d3a4c53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 21 deletions

View file

@ -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) {

View file

@ -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

View file

@ -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;

View file

@ -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();
}
}
}
}