Skip to content

selectionChanged on SelectionListener not Working!! #9

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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