Fix #7752 fix design

This commit is contained in:
Dima-1 2020-01-30 18:33:51 +02:00
parent 04592db0fa
commit e2a4153871

View file

@ -240,7 +240,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
info.getFileName()); info.getFileName());
confirm.setMessage(getString(R.string.clear_confirmation_msg, fn)); confirm.setMessage(getString(R.string.clear_confirmation_msg, fn));
confirm.show(); confirm.show();
} else if (resId == R.string.maps_define_edit) { } else if (resId == R.string.shared_string_edit) {
OsmandRasterMapsPlugin.defineNewEditLayer(getDownloadActivity(), OsmandRasterMapsPlugin.defineNewEditLayer(getDownloadActivity(),
new ResultMatcher<TileSourceManager.TileSourceTemplate>() { new ResultMatcher<TileSourceManager.TileSourceTemplate>() {
@Override @Override
@ -1239,24 +1239,24 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
}); });
if (info.getType() == LocalIndexType.TILES_DATA && (info.getAttachedObject() instanceof ITileSource) && if (info.getType() == LocalIndexType.TILES_DATA && (info.getAttachedObject() instanceof ITileSource) &&
((ITileSource) info.getAttachedObject()).couldBeDownloadedFromInternet()) { ((ITileSource) info.getAttachedObject()).couldBeDownloadedFromInternet()) {
item = optionsMenu.getMenu().add(R.string.clear_tile_data) item = optionsMenu.getMenu().add(R.string.shared_string_edit)
.setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_remove_dark)); .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override @Override
public boolean onMenuItemClick(MenuItem item) { public boolean onMenuItemClick(MenuItem item) {
performBasicOperation(R.string.clear_tile_data, info); performBasicOperation(R.string.shared_string_edit, info);
return true; return true;
} }
}); });
} }
if (info.getType() == LocalIndexType.TILES_DATA && (info.getAttachedObject() instanceof ITileSource) && if (info.getType() == LocalIndexType.TILES_DATA && (info.getAttachedObject() instanceof ITileSource) &&
((ITileSource)info.getAttachedObject()).couldBeDownloadedFromInternet()) { ((ITileSource)info.getAttachedObject()).couldBeDownloadedFromInternet()) {
item = optionsMenu.getMenu().add(R.string.maps_define_edit) item = optionsMenu.getMenu().add(R.string.clear_tile_data)
.setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_type_edit)); .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_remove_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override @Override
public boolean onMenuItemClick(MenuItem item) { public boolean onMenuItemClick(MenuItem item) {
performBasicOperation(R.string.maps_define_edit, info); performBasicOperation(R.string.clear_tile_data, info);
return true; return true;
} }
}); });