use of net.osmand.plus.track.helpers.FilteredSelectedGpxFile in project Osmand by osmandapp.
the class GpsFilterFragment method restoreSelectedGpxFile.
private void restoreSelectedGpxFile(String gpxFilePath) {
if (!Algorithms.isEmpty(gpxFilePath)) {
TrackMenuFragment.loadSelectedGpxFile(requireMapActivity(), gpxFilePath, false, (gpxFile) -> {
selectedGpxFile = gpxFile;
FilteredSelectedGpxFile filteredSelectedGpxFile = setFileToFilter(selectedGpxFile);
if (view != null && filteredSelectedGpxFile != null) {
initContent(filteredSelectedGpxFile);
}
return true;
});
}
}
use of net.osmand.plus.track.helpers.FilteredSelectedGpxFile in project Osmand by osmandapp.
the class GpsFilterFragment method setupToolbar.
private void setupToolbar() {
View toolbar = view.findViewById(R.id.toolbar);
AndroidUiHelper.updateVisibility(toolbar, isPortrait());
ImageButton closeButton = toolbar.findViewById(R.id.close_button);
closeButton.setOnClickListener(v -> dismiss(false));
closeButton.setImageResource(AndroidUtils.getNavigationIconResId(toolbar.getContext()));
View resetToOriginalButton = toolbar.findViewById(R.id.reset_to_original_button);
resetToOriginalButton.setOnClickListener(v -> {
FilteredSelectedGpxFile filteredSelectedGpxFile = selectedGpxFile.getFilteredSelectedGpxFile();
if (filteredSelectedGpxFile != null && app != null) {
filteredSelectedGpxFile.resetFilters(app);
gpsFilterScreensAdapter.onResetFilters();
}
});
View scrollToActionsButton = toolbar.findViewById(R.id.scroll_to_actions_button);
scrollToActionsButton.setOnClickListener(v -> {
if (gpsFilterScreensAdapter != null) {
gpsFilterScreensAdapter.softScrollToActionsCard();
}
});
}
Aggregations