Skip to content

Commit

Permalink
Merge pull request #506 from shikoko/ANDROID-676
Browse files Browse the repository at this point in the history
ANDROID-676 Save button enabled in Alfresco editor, even no change is made
  • Loading branch information
shikoko authored Oct 12, 2018
2 parents 83bee0e + e8484d2 commit f2e5f88
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -373,6 +374,7 @@ public void afterTextChanged(Editable s)
{
if (!changed && s.length() != originalLength)
{
invalidateOptionsMenu();
changed = true;
modified = true;
}
Expand Down

0 comments on commit f2e5f88

Please sign in to comment.