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,10 +37,8 @@ public class BaseOsmAndFragment extends Fragment {
activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId)); activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, colorId));
} }
} }
if (!isFullScreenAllowed()) { if (!isFullScreenAllowed() && activity instanceof MapActivity) {
if (activity instanceof MapActivity) { ((MapActivity) activity).exitFromFullScreen();
((MapActivity) activity).exitFromFullScreen();
}
} }
} }
} }
@ -53,10 +51,8 @@ public class BaseOsmAndFragment extends Fragment {
if (statusBarColor != -1) { if (statusBarColor != -1) {
activity.getWindow().setStatusBarColor(statusBarColor); activity.getWindow().setStatusBarColor(statusBarColor);
} }
if (!isFullScreenAllowed()) { if (!isFullScreenAllowed() && activity instanceof MapActivity) {
if (activity instanceof MapActivity) { ((MapActivity) activity).enterToFullScreen();
((MapActivity) activity).enterToFullScreen();
}
} }
} }
} }

View file

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

View file

@ -138,7 +138,17 @@ public class QuickActionListFragment extends BaseOsmAndFragment implements Quick
quickActionRegistry.setUpdatesListener(null); quickActionRegistry.setUpdatesListener(null);
} }
private MapActivity getMapActivity() { @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(); return (MapActivity) getActivity();
} }