diff --git a/app/src/main/java/mobi/maptrek/fragments/PlaceInformation.java b/app/src/main/java/mobi/maptrek/fragments/PlaceInformation.java index 2c75404f..7477e045 100644 --- a/app/src/main/java/mobi/maptrek/fragments/PlaceInformation.java +++ b/app/src/main/java/mobi/maptrek/fragments/PlaceInformation.java @@ -170,7 +170,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat if (Boolean.TRUE.equals(viewModel.editorMode.getValue())) { Editable text = viewBinding.nameEdit.getText(); if (text != null) - place.name = text.toString(); + place.name = text.toString().trim(); text = viewBinding.descriptionEdit.getText(); if (text != null) place.description = text.toString(); diff --git a/app/src/main/java/mobi/maptrek/fragments/TrackInformation.java b/app/src/main/java/mobi/maptrek/fragments/TrackInformation.java index 1fb0f056..b3b0c2bf 100644 --- a/app/src/main/java/mobi/maptrek/fragments/TrackInformation.java +++ b/app/src/main/java/mobi/maptrek/fragments/TrackInformation.java @@ -519,7 +519,7 @@ public void onChanged(Boolean enabled) { mFragmentHolder.enableListActionButton(R.drawable.ic_done, v -> { Editable text = viewBinding.nameEdit.getText(); if (text != null) - track.name = text.toString(); + track.name = text.toString().trim(); track.style.color = viewBinding.colorSwatch.getColor(); mListener.onTrackSave(track); viewModel.editorMode.setValue(false);