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

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

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

         

标签

使用APP客户端扫描二维码运行Demo


         

类似的还有....
showhidepasswordedittext Show/Hide Password EditText is a very simple extension of Android's EditText that puts a clickable hide/show icon in the right hand side of the EditText that allows showing of the password.
MaterialEditText Material Design EditText with a delightful linear ripple in background
PasswordEditText A custom EditText with a switchable icon which shows or hides the password
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