Merge pull request #4211 from osmandapp/mapillary_photos

Fix #4207
This commit is contained in:
Alexey 2017-07-26 16:38:47 +03:00 committed by GitHub
commit 728c53cc69
4 changed files with 10 additions and 0 deletions

View file

@ -24,6 +24,7 @@ import android.support.v4.app.ActivityCompat;
import android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.AlertDialog;
import android.util.DisplayMetrics;
@ -89,6 +90,7 @@ import net.osmand.plus.helpers.WakeLockHelper;
import net.osmand.plus.inapp.InAppHelper;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.MapContextMenuFragment;
import net.osmand.plus.mapcontextmenu.builders.cards.dialogs.ContextMenuCardDialogFragment;
import net.osmand.plus.mapcontextmenu.other.DestinationReachedMenu;
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenuFragment;
@ -749,6 +751,10 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
}
}
public void dismissCardDialog() {
getSupportFragmentManager().popBackStack(ContextMenuCardDialogFragment.TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
}
@Override
public void onDismissDialogFragment(DialogFragment dialogFragment) {
if (dialogFragment instanceof DataStoragePlaceDialogFragment) {

View file

@ -921,6 +921,7 @@ public class MapActivityActions implements DialogProvider {
menuItemsListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
mapActivity.dismissCardDialog();
ContextMenuItem item = contextMenuAdapter.getItem(position);
ContextMenuAdapter.ItemClickListener click = item.getItemClickListener();
if (click != null && click.onContextMenuClick(simpleListAdapter, item.getTitleId(),

View file

@ -796,6 +796,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
removeMapillaryFiltersFragment();
if (visible) {
mapActivity.dismissCardDialog();
mapActivity.getContextMenu().hideMenues();
mapViewLocation = mapActivity.getMapLocation();
mapRotation = mapActivity.getMapRotate();

View file

@ -273,6 +273,7 @@ public class MapControlsLayer extends OsmandMapLayer {
search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mapActivity.dismissCardDialog();
mapActivity.showQuickSearch(ShowQuickSearchMode.NEW_IF_EXPIRED, false);
}
});
@ -423,6 +424,7 @@ public class MapControlsLayer extends OsmandMapLayer {
routePlanButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mapActivity.dismissCardDialog();
doRoute(false);
}
});