Merge pull request #8465 from osmandapp/GrayBarBottomFix
Fix "gray bar at the bottom of the screen"
This commit is contained in:
commit
8d4d3a4c53
4 changed files with 18 additions and 21 deletions
|
@ -167,6 +167,10 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
|
||||||
descriptionEdit.setHint(R.string.access_hint_enter_description);
|
descriptionEdit.setHint(R.string.access_hint_enter_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
|
AndroidUtils.addStatusBarPadding21v(app, view);
|
||||||
|
}
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,11 +238,6 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
|
||||||
return R.color.status_bar_color_light;
|
return R.color.status_bar_color_light;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean isFullScreenAllowed() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void hideKeyboard() {
|
private void hideKeyboard() {
|
||||||
FragmentActivity activity = getActivity();
|
FragmentActivity activity = getActivity();
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
|
|
|
@ -2,6 +2,7 @@ package net.osmand.plus.profiles;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
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
|
return mainView;
|
||||||
protected boolean isFullScreenAllowed() {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.quickaction;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
@ -24,6 +25,7 @@ import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
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;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,11 +151,6 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick
|
||||||
quickActionRegistry.setUpdatesListener(null);
|
quickActionRegistry.setUpdatesListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean isFullScreenAllowed() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getStatusBarColorId() {
|
public int getStatusBarColorId() {
|
||||||
return isLightContent ? R.color.status_bar_color_light : R.color.status_bar_color_dark;
|
return isLightContent ? R.color.status_bar_color_light : R.color.status_bar_color_dark;
|
||||||
|
|
|
@ -178,6 +178,9 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
|
||||||
createToolbar(inflater, view);
|
createToolbar(inflater, view);
|
||||||
setDivider(null);
|
setDivider(null);
|
||||||
view.setBackgroundColor(ContextCompat.getColor(app, getBackgroundColorRes()));
|
view.setBackgroundColor(ContextCompat.getColor(app, getBackgroundColorRes()));
|
||||||
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
|
AndroidUtils.addStatusBarPadding21v(app, view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
@ -250,9 +253,6 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
|
||||||
activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId));
|
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) {
|
if (!(activity instanceof MapActivity) && statusBarColor != -1) {
|
||||||
activity.getWindow().setStatusBarColor(statusBarColor);
|
activity.getWindow().setStatusBarColor(statusBarColor);
|
||||||
}
|
}
|
||||||
if (activity instanceof MapActivity) {
|
|
||||||
((MapActivity) activity).enterToFullScreen();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue