Small edit and fix
This commit is contained in:
parent
b249fdbab6
commit
27dd342375
2 changed files with 5 additions and 7 deletions
|
@ -50,7 +50,7 @@ public class DescriptionCard extends BaseCard {
|
|||
|
||||
setupImage(imageUrl);
|
||||
|
||||
if (descriptionHtml == null || Algorithms.isEmpty(descriptionHtml.trim())) {
|
||||
if (Algorithms.isBlank(descriptionHtml)) {
|
||||
showAddBtn();
|
||||
} else {
|
||||
showDescription(title, imageUrl, descriptionHtml);
|
||||
|
@ -73,7 +73,10 @@ public class DescriptionCard extends BaseCard {
|
|||
|
||||
private void showDescription(final String title, final String imageUrl, final String descriptionHtml) {
|
||||
LinearLayout descriptionContainer = view.findViewById(R.id.description_container);
|
||||
FrameLayout addBtn = view.findViewById(R.id.btn_add);
|
||||
|
||||
AndroidUiHelper.updateVisibility(descriptionContainer, true);
|
||||
AndroidUiHelper.updateVisibility(addBtn, false);
|
||||
|
||||
TextViewEx tvDescription = view.findViewById(R.id.description);
|
||||
tvDescription.setText(getFirstParagraph(descriptionHtml));
|
||||
|
|
|
@ -84,17 +84,12 @@ public class GpxEditDescriptionDialogFragment extends BaseOsmAndDialogFragment {
|
|||
return view;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private boolean shouldClose() {
|
||||
Editable editable = editableHtml.getText();
|
||||
if (htmlCode == null || editable == null || editable.toString() == null) {
|
||||
return true;
|
||||
}
|
||||
if (htmlCode.equals(editable.toString())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return htmlCode.equals(editable.toString());
|
||||
}
|
||||
|
||||
private void showDismissDialog() {
|
||||
|
|
Loading…
Reference in a new issue