diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 9e99c63596..228afb66a8 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,12 +9,12 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
- GPX - suitable for import to JOSM or other OSM editors.
- OSC - suitable for import to OpenStreetMap.
+ GPX - suitable for export to JOSM or other OSM editors.
+ OSC - suitable for export to OpenStreetMap.
GPX file
OSC file
Choose file type
- Select the import type: OSM notes, POI, or both.
+ Select the export type: OSM notes, POI, or both.
All data
OSM Notes
Will open tomorrow at
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/ExportOptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/ExportOptionsBottomSheetDialogFragment.java
index 89ca404573..2fcc6742ff 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/ExportOptionsBottomSheetDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/ExportOptionsBottomSheetDialogFragment.java
@@ -54,35 +54,50 @@ public class ExportOptionsBottomSheetDialogFragment extends MenuBottomSheetDialo
((TextView) mainView.findViewById(R.id.osm_notes_count_text_view)).setText(String.valueOf(osmNotesCount));
((TextView) mainView.findViewById(R.id.all_data_count_text_view)).setText(String.valueOf(poiCount + osmNotesCount));
- mainView.findViewById(R.id.poi_row).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (listener != null) {
- listener.onClick(OsmEditsFragment.EXPORT_TYPE_POI);
+ View poiRow = mainView.findViewById(R.id.poi_row);
+ if (poiCount > 0) {
+ poiRow.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (listener != null) {
+ listener.onClick(OsmEditsFragment.EXPORT_TYPE_POI);
+ }
+ dismiss();
}
- dismiss();
- }
- });
+ });
+ } else {
+ disable(poiRow);
+ }
- mainView.findViewById(R.id.osm_notes_row).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (listener != null) {
- listener.onClick(OsmEditsFragment.EXPORT_TYPE_NOTES);
+ View osmNotesRow = mainView.findViewById(R.id.osm_notes_row);
+ if (osmNotesCount > 0) {
+ osmNotesRow.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (listener != null) {
+ listener.onClick(OsmEditsFragment.EXPORT_TYPE_NOTES);
+ }
+ dismiss();
}
- dismiss();
- }
- });
+ });
+ } else {
+ disable(osmNotesRow);
+ }
- mainView.findViewById(R.id.all_data_row).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (listener != null) {
- listener.onClick(OsmEditsFragment.EXPORT_TYPE_ALL);
+ View allDataRow = mainView.findViewById(R.id.all_data_row);
+ if ((poiCount + osmNotesCount) > 0) {
+ allDataRow.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (listener != null) {
+ listener.onClick(OsmEditsFragment.EXPORT_TYPE_ALL);
+ }
+ dismiss();
}
- dismiss();
- }
- });
+ });
+ } else {
+ disable(allDataRow);
+ }
mainView.findViewById(R.id.cancel_row).setOnClickListener(new View.OnClickListener() {
@Override
@@ -96,6 +111,11 @@ public class ExportOptionsBottomSheetDialogFragment extends MenuBottomSheetDialo
return mainView;
}
+ private void disable(View view) {
+ view.setEnabled(false);
+ view.setAlpha(.5f);
+ }
+
public interface ExportOptionsFragmentListener {
void onClick(@ExportTypesDef int type);