Skip to content

selectionChanged on SelectionListener not Working!! #9

@masoud-c

Description

@masoud-c

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();
        }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions