From e8484d2c0c2d2b21d4d554bd700008e3f9f80faf Mon Sep 17 00:00:00 2001 From: Bogdan Roatis Date: Fri, 12 Oct 2018 14:28:51 +0300 Subject: [PATCH] ANDROID-676 Save button enabled in Alfresco editor, even no change is made --- .../android/application/editors/text/TextEditorActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java index 71e4f4b9..4f312cf6 100644 --- a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java +++ b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java @@ -251,6 +251,7 @@ public boolean onCreateOptionsMenu(Menu menu) getAppActionBar().setDisplayShowTitleEnabled(true); MenuItem mi = menu.add(Menu.NONE, R.id.menu_editor_save, Menu.FIRST, R.string.save); mi.setIcon(R.drawable.ic_save); + mi.setEnabled(changed); mi.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); if (hasTextToSpeech) @@ -373,6 +374,7 @@ public void afterTextChanged(Editable s) { if (!changed && s.length() != originalLength) { + invalidateOptionsMenu(); changed = true; modified = true; }