Search in sources :

Example 1 with FavoritesActivity

use of net.osmand.plus.myplaces.ui.FavoritesActivity in project Osmand by osmandapp.

the class SendGpxBottomSheetFragment method showOpenStreetMapScreen.

protected static void showOpenStreetMapScreen(@NonNull FragmentActivity activity) {
    if (activity instanceof MapActivity) {
        BaseSettingsFragment.showInstance(activity, OPEN_STREET_MAP_EDITING);
    } else {
        Bundle prevIntentParams = null;
        if (activity instanceof FavoritesActivity) {
            prevIntentParams = ((FavoritesActivity) activity).storeCurrentState();
        } else if (activity.getIntent() != null) {
            prevIntentParams = activity.getIntent().getExtras();
        }
        Bundle params = new Bundle();
        params.putString(BaseSettingsFragment.OPEN_SETTINGS, OPEN_STREET_MAP_EDITING.name());
        MapActivity.launchMapActivityMoveToTop(activity, prevIntentParams, null, params);
    }
}
Also used : Bundle(android.os.Bundle) MapActivity(net.osmand.plus.activities.MapActivity) FavoritesActivity(net.osmand.plus.myplaces.ui.FavoritesActivity)

Aggregations

Bundle (android.os.Bundle)1 MapActivity (net.osmand.plus.activities.MapActivity)1 FavoritesActivity (net.osmand.plus.myplaces.ui.FavoritesActivity)1