Merge pull request #8850 from osmandapp/Fix_map_source_name

Fix edit map source name
This commit is contained in:
max-klaus 2020-04-28 14:00:57 +03:00 committed by GitHub
commit d8e1e4b3ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -496,8 +496,6 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
AlertDialog.Builder bld = new AlertDialog.Builder(new ContextThemeWrapper(activity, getThemeRes(activity, app)));
View view = UiUtilities.getInflater(activity, isNightMode(activity, app)).inflate(R.layout.editing_tile_source, null);
final EditText name = (EditText) view.findViewById(R.id.Name);
name.setFocusable(false);
name.setFocusableInTouchMode(false);
final Spinner existing = (Spinner) view.findViewById(R.id.TileSourceSpinner);
final TextView existingHint = (TextView) view.findViewById(R.id.TileSourceHint);
final EditText urlToLoad = (EditText) view.findViewById(R.id.URLToLoad);
@ -521,6 +519,8 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
existing.setAdapter(adapter);
TileSourceTemplate template;
if (editedLayerName != null) {
name.setFocusable(false);
name.setFocusableInTouchMode(false);
if (!editedLayerName.endsWith(IndexConstants.SQLITE_EXT)) {
File f = ((OsmandApplication) activity.getApplication()).getAppPath(
IndexConstants.TILES_INDEX_DIR + editedLayerName);