Fix fit route on map after calc on tablet landscape
This commit is contained in:
parent
a17274c372
commit
87a2740e6f
2 changed files with 7 additions and 5 deletions
|
@ -1818,7 +1818,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
WeakReference<MapRouteInfoMenuFragment> fragmentRef = mapRouteInfoMenu.findMenuFragment();
|
WeakReference<MapRouteInfoMenuFragment> fragmentRef = mapRouteInfoMenu.findMenuFragment();
|
||||||
if (fragmentRef != null) {
|
if (fragmentRef != null) {
|
||||||
MapRouteInfoMenuFragment f = fragmentRef.get();
|
MapRouteInfoMenuFragment f = fragmentRef.get();
|
||||||
if (landscapeLayout) {
|
if (!f.isPortrait()) {
|
||||||
tileBoxWidthPx = tb.getPixWidth() - f.getWidth();
|
tileBoxWidthPx = tb.getPixWidth() - f.getWidth();
|
||||||
} else {
|
} else {
|
||||||
tileBoxHeightPx = tb.getPixHeight() - f.getHeight();
|
tileBoxHeightPx = tb.getPixHeight() - f.getHeight();
|
||||||
|
|
|
@ -1684,10 +1684,12 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
||||||
WeakReference<MapRouteInfoMenuFragment> fragmentRef = routeInfoMenu.findMenuFragment();
|
WeakReference<MapRouteInfoMenuFragment> fragmentRef = routeInfoMenu.findMenuFragment();
|
||||||
if (fragmentRef != null) {
|
if (fragmentRef != null) {
|
||||||
MapRouteInfoMenuFragment f = fragmentRef.get();
|
MapRouteInfoMenuFragment f = fragmentRef.get();
|
||||||
if (mapActivity.isLandscapeLayout()) {
|
if (f != null) {
|
||||||
tileBoxWidthPx = tb.getPixWidth() - f.getWidth();
|
if (!f.isPortrait()) {
|
||||||
} else {
|
tileBoxWidthPx = tb.getPixWidth() - f.getWidth();
|
||||||
tileBoxHeightPx = tb.getPixHeight() - f.getHeight();
|
} else {
|
||||||
|
tileBoxHeightPx = tb.getPixHeight() - f.getHeight();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mapActivity.getMapView().fitLocationToMap(latitude, longitude, mapActivity.getMapView().getZoom(),
|
mapActivity.getMapView().fitLocationToMap(latitude, longitude, mapActivity.getMapView().getZoom(),
|
||||||
|
|
Loading…
Reference in a new issue