Add small fixes

This commit is contained in:
alex 2017-11-06 16:57:28 +02:00
parent a9d58cd529
commit b1938b0b39
3 changed files with 16 additions and 10 deletions

View file

@ -37,13 +37,11 @@ public class BaseOsmAndFragment extends Fragment {
activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId));
}
}
if (!isFullScreenAllowed()) {
if (activity instanceof MapActivity) {
if (!isFullScreenAllowed() && activity instanceof MapActivity) {
((MapActivity) activity).exitFromFullScreen();
}
}
}
}
@Override
public void onPause() {
@ -53,13 +51,11 @@ public class BaseOsmAndFragment extends Fragment {
if (statusBarColor != -1) {
activity.getWindow().setStatusBarColor(statusBarColor);
}
if (!isFullScreenAllowed()) {
if (activity instanceof MapActivity) {
if (!isFullScreenAllowed() && activity instanceof MapActivity) {
((MapActivity) activity).enterToFullScreen();
}
}
}
}
@ColorRes
public int getStatusBarColorId() {

View file

@ -219,7 +219,7 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
return R.color.status_bar_light;
}
` @Override
@Override
protected boolean isFullScreenAllowed() {
return false;
}

View file

@ -138,6 +138,16 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick
quickActionRegistry.setUpdatesListener(null);
}
@Override
protected boolean isFullScreenAllowed() {
return false;
}
@Override
public int getStatusBarColorId() {
return getSettings().isLightContent() ? R.color.status_bar_light : R.color.status_bar_dark;
}
private MapActivity getMapActivity() {
return (MapActivity) getActivity();
}