This commit is contained in:
Dima-1 2020-04-15 19:07:31 +03:00
parent d09e7346dc
commit a963f82c1d
2 changed files with 11 additions and 21 deletions

View file

@ -1,14 +0,0 @@
{
"categories" : {
"special" : {
"icons" : [
"special_star", "special_star_stroked", "special_marker", "special_flag_stroke", "special_house", "special_building"
]
},
"amenity" : {
"icons": [
"amenity_bar", "amenity_cafe", "amenity_atm", "amenity_biergarten", "amenity_cinema", "amenity_fire_station", "amenity_parking"
]
}
}
}

View file

@ -1,5 +1,6 @@
package net.osmand.plus.helpers;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
@ -81,7 +82,10 @@ public class SelectGpxTrackBottomSheet extends MenuBottomSheetDialogFragment {
callbackWithObject.processResult(new GPXUtilities.GPXFile[]{selectedGpxFile.getGpxFile()});
} else {
File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
GpxUiHelper.loadGPXFileInDifferentThread(requireActivity(), callbackWithObject, dir, null, fileName);
Activity activity = getActivity();
if (activity != null) {
GpxUiHelper.loadGPXFileInDifferentThread(activity, callbackWithObject, dir, null, fileName);
}
}
}
}
@ -90,13 +94,13 @@ public class SelectGpxTrackBottomSheet extends MenuBottomSheetDialogFragment {
public static void showInstance(FragmentManager fragmentManager, boolean showCurrentGpx,
CallbackWithObject<GPXUtilities.GPXFile[]> callbackWithObject, List<GpxUiHelper.GPXInfo> gpxInfoList) {
SelectGpxTrackBottomSheet fragment = new SelectGpxTrackBottomSheet();
fragment.setUsedOnMap(true);
fragment.setRetainInstance(true);
fragment.setShowCurrentGpx(showCurrentGpx);
fragment.setCallbackWithObject(callbackWithObject);
fragment.setGpxInfoList(gpxInfoList);
if (!fragmentManager.isStateSaved()) {
SelectGpxTrackBottomSheet fragment = new SelectGpxTrackBottomSheet();
fragment.setUsedOnMap(true);
fragment.setRetainInstance(true);
fragment.setShowCurrentGpx(showCurrentGpx);
fragment.setCallbackWithObject(callbackWithObject);
fragment.setGpxInfoList(gpxInfoList);
fragment.show(fragmentManager, SelectGpxTrackBottomSheet.TAG);
}
}