Implement Undo and Redo in an EditText on Android

2

As much as I am looking for, the EditText component does not integrate a Undo changes system, I would like to implement a system Undo/Redo ie Deshacer/Rehacer

Or do you know a component that derives from EditText of Android but has a system of Undo/Redo or only Undo ?

Update Something I found by Github on the subject.

But I do not understand how it is implemented, I need a basic example

    
asked by Webserveis 26.06.2016 в 08:18
source

1 answer

0

According to this response from SO:

You use the methods of the class in the listener of a button for example.

  LaClaseQueEncontrasteEnGitHub mTextViewUndoRedo = new LaClaseQueEncontrasteEnGitHub (edtNoteDescription);

BotonUndo.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
        mTextViewUndoRedo.undo();
    }
});


if (mmPosition == 0) { 
     return null;
 }

You can still check that answer so you can see all the comments on that question.

    
answered by 29.06.2016 в 16:21