开发者

How to get text selected before user clicks on Copy

开发者 https://www.devze.com 2023-04-03 17:41 出处:网络
I have a WebView and I want user to be able to select text and then display a QuickAction so that they can choose the action he will perform on that text he just selected.

I have a WebView and I want user to be able to select text and then display a QuickAction so that they can choose the action he will perform on that text he just selected.

The problem I have is that I can't find a way to get text selected before the user clicks on Copy on the Action Bar.

How to get text selected before user clicks on Copy

I want to popup the QuickAction as soon as TouchUp event is fired and I don't want to have them to sele开发者_StackOverflow中文版ct Copy on the Action Bar before that.

Any idea on how to implement this behaviour?

I'm developping on Android 3.1 SDK and using android.content.ClipboardManager.

0

精彩评论

暂无评论...
验证码 换一张
取 消