yydcdut / RxMarkdown

:fax:Markdown for Android, supports TextView && EditText (Live Preview), supports code high light.
749 stars 93 forks source link

TodoClickCallback should return lineNumber instead of content #48

Closed stefan-niedermann closed 6 years ago

stefan-niedermann commented 6 years ago

Multiple lines might contain the same content. Therefore, one can not safely replace the checked/unchecked-checkbox.

The solution would be to provide the lineNumber instead od the lineContent in the callback.

Example:


.setOnTodoClickCallback(new OnTodoClickCallback() {//todo or done click callback
@Override
public CharSequence onTodoClicked(View view, int lineNumber) {
return noteContent.getText();
}```