From 78175e8a1cd269cb6609828d9e8bef237ee04294 Mon Sep 17 00:00:00 2001 From: androiddevkotlin <64539346+androiddevkotlin@users.noreply.github.com> Date: Mon, 29 Mar 2021 13:39:36 +0300 Subject: [PATCH] Import header, storage path replace in UI display --- .../main/java/com/jwetherell/openmap/common/MGRSPoint.java | 4 ++-- .../plus/settings/datastorage/DataStorageFragment.java | 5 ++++- .../osmand/plus/settings/datastorage/DataStorageHelper.java | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java b/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java index be6793bef8..519fc9d171 100644 --- a/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java +++ b/OsmAnd-java/src/main/java/com/jwetherell/openmap/common/MGRSPoint.java @@ -699,8 +699,8 @@ public class MGRSPoint extends ZonedUTMPoint { String zero = ""; } - all.add(String.format(java.util.Locale.US,"%0" + accuracy + "d", roundedEasting)); - all.add(String.format(java.util.Locale.US,"%0" + accuracy + "d", roundedNorthing)); + all.add(String.format(Locale.US,"%0" + accuracy + "d", roundedEasting)); + all.add(String.format(Locale.US,"%0" + accuracy + "d", roundedNorthing)); break; } } diff --git a/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageFragment.java b/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageFragment.java index 7fd96b8185..e25a4a6cc0 100644 --- a/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageFragment.java @@ -46,6 +46,7 @@ import java.util.ArrayList; import static net.osmand.plus.settings.datastorage.DataStorageHelper.INTERNAL_STORAGE; import static net.osmand.plus.settings.datastorage.DataStorageHelper.MANUALLY_SPECIFIED; import static net.osmand.plus.settings.datastorage.DataStorageHelper.OTHER_MEMORY; +import static net.osmand.plus.settings.datastorage.DataStorageHelper.SHARED_STORAGE; import static net.osmand.plus.settings.datastorage.DataStorageHelper.TILES_MEMORY; import static net.osmand.plus.settings.bottomsheets.ChangeDataStorageBottomSheet.CHOSEN_DIRECTORY; import static net.osmand.plus.settings.bottomsheets.ChangeDataStorageBottomSheet.MOVE_DATA; @@ -226,7 +227,7 @@ public class DataStorageFragment extends BaseSettingsFragment implements DataSto int defaultIconColor = isNightMode() ? R.color.icon_color_default_dark : R.color.icon_color_default_light; int chosenIconColor = isNightMode() ? R.color.icon_color_osmand_dark : R.color.icon_color_osmand_light; - Drawable icon = app.getUIUtilities().getIcon(item.getIconResId(), + Drawable icon = app.getUIUtilities().getIcon(item.getIconResId(), isCurrent ? chosenIconColor : defaultIconColor); ivIcon.setImageDrawable(icon); @@ -249,6 +250,8 @@ public class DataStorageFragment extends BaseSettingsFragment implements DataSto } if (currentKey.equals(INTERNAL_STORAGE)) { tvAdditionalDescription.setText(item.getDescription()); + } else if(currentKey.equals(SHARED_STORAGE)){ + tvAdditionalDescription.setText(String.format("\u200E%s", item.getDirectory())); } else { tvAdditionalDescription.setText(item.getDirectory()); } diff --git a/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageHelper.java b/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageHelper.java index b292a02e0d..67fd73897e 100644 --- a/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageHelper.java +++ b/OsmAnd/src/net/osmand/plus/settings/datastorage/DataStorageHelper.java @@ -106,7 +106,7 @@ public class DataStorageHelper { //shared storage dir = settings.getDefaultInternalStorage(); - path = "\u200e" + dir.getAbsolutePath(); + path = dir.getAbsolutePath(); iconId = R.drawable.ic_action_phone; StorageItem sharedStorageItem = StorageItem.builder()