Android EditText的撤销和恢复(反撤销)

Min SDK   9
Latest Commit   2016-12-15 04:36:35
License   Apache-2.0

Github   https://github.com/qinci/AndroidEdit

         

标签

Using app client to scan QR code to run Demo


         

Similarily...
RxMarkdown Markdown for Android, supports TextView && EditText (Live Preview), supports code high light.
AutosizeEditText AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.
Masked-Edittext Android library contain custom realisation of EditText component for masking and formatting input text
README

README.md

AndroidEdit

提取我正在做Markdown编辑器的一个功能

####EditText的撤销和恢复撤销操作 #####使用

  • 引入库
    • compile 'ren.qinc.edit:lib:0.0.5'
  • 初始化
    mEditText = ((EditText) findViewById(R.id.editText));
    //创建PerformEdit,一定要传入不为空的EditText
    mPerformEdit = new PerformEdit(mEditText);
    mPerformEdit.setDefaultText("这是初始值,不做撤销记录");
  • 撤销和恢复
	//撤销
	mPerformEdit.undo();
    //重做
    mPerformEdit.redo();
    //清除历史
    mPerformEdit.clearHistory();
  • 演示图

    Image

  • 最后欢迎您star、fork