We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用MarkdownEditText时,我添加了TextWatcher用于实现撤销与重做功能,同时我提供了一个开关,用于关闭实时预览功能,逻辑是直接不执行MarkdownProcessor的初始化操作。
MarkdownEditText
TextWatcher
MarkdownProcessor
但是当MarkdownProcessor的初始化操作没有被执行时,我的TextWatcher没有生效。翻阅源码后,发现额外添加的TextWatcher依赖于mEditTextWatcher(MarkdownEditText.EditTextWatcher)实现,而它仅在setFactoryAndConfig方法中被添加到超类中,又因为setFactoryAndConfig的唯一用法是MarkdownProcessor.live(editText),所以导致了不生效。
mEditTextWatcher
MarkdownEditText.EditTextWatcher
setFactoryAndConfig
MarkdownProcessor.live(editText)
并且,提供的clear()方法也会卸载mEditTextWatcher,所以没有方法能在取消实时预览的同时使用其它TextWatcher的方法。
clear()
这应该是一个Bug,否则clear()方法也会导致这个问题出现。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用
MarkdownEditText
时,我添加了TextWatcher
用于实现撤销与重做功能,同时我提供了一个开关,用于关闭实时预览功能,逻辑是直接不执行MarkdownProcessor
的初始化操作。但是当
MarkdownProcessor
的初始化操作没有被执行时,我的TextWatcher
没有生效。翻阅源码后,发现额外添加的TextWatcher
依赖于mEditTextWatcher
(MarkdownEditText.EditTextWatcher
)实现,而它仅在setFactoryAndConfig
方法中被添加到超类中,又因为setFactoryAndConfig
的唯一用法是MarkdownProcessor.live(editText)
,所以导致了不生效。并且,提供的
clear()
方法也会卸载mEditTextWatcher
,所以没有方法能在取消实时预览的同时使用其它TextWatcher
的方法。这应该是一个Bug,否则
clear()
方法也会导致这个问题出现。The text was updated successfully, but these errors were encountered: