Merge pull request #4717 from osmandapp/landscape_fix

Landscape fix
This commit is contained in:
Alexey 2017-11-10 18:40:36 +03:00 committed by GitHub
commit 6b29b19dc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -265,14 +265,14 @@
<include
layout="@layout/move_marker_bottom_sheet"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
tools:visibility="visible"/>
<include
layout="@layout/add_gpx_point_bottom_sheet"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
tools:visibility="visible"/>

View file

@ -340,6 +340,9 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
if (removeFragment(PlanRouteFragment.TAG)) {
app.getMapMarkersHelper().getPlanRouteContext().setFragmentVisible(true);
}
if (TrackDetailsMenu.isVisible()) {
mapLayers.getMapControlsLayer().getTrackDetailsMenu().hide();
}
removeFragment(ImportGpxBottomSheetDialogFragment.TAG);
super.onSaveInstanceState(outState);
}

View file

@ -180,7 +180,7 @@ public class TrackDetailsMenuFragment extends BaseOsmAndFragment {
public static boolean showInstance(final MapActivity mapActivity) {
try {
boolean portrait = mapActivity.findViewById(R.id.bottomFragmentContainer) != null;
boolean portrait = AndroidUiHelper.isOrientationPortrait(mapActivity);
TrackDetailsMenuFragment fragment = new TrackDetailsMenuFragment();
mapActivity.getSupportFragmentManager().beginTransaction()
.add(portrait ? R.id.bottomFragmentContainer : R.id.routeMenuContainer, fragment, TAG)