I use this code to get selected text, startSelection and endSelection work fine but selectionChanged never get called... what's the problem?
mTextSelectionSupport.setSelectionListener(new TextSelectionSupport.SelectionListener() {
@Override
public void startSelection() {
Toast.makeText(ReadBookActivity.this, "s", Toast.LENGTH_SHORT).show();
}
@Override
public void selectionChanged(String text) {
selectedText = text;
Toast.makeText(ReadBookActivity.this, text, Toast.LENGTH_SHORT).show();
}
@Override
public void endSelection() {
Toast.makeText(ReadBookActivity.this, "e", Toast.LENGTH_SHORT).show();
}
});