How to get text selected before user clicks on Copy - android

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.
I want to popup the QuickAction as soon as TouchUp event is fired and I don't want to have them to select 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.

Related

How to connect native action button of notification in android to button which is present on webview.?

Basically I want to build a notification with action button and when the action button is clicked i want to perform a action which is same as clicking a button on webview .So is there any way to do?Please list all the possible approaches.

Android highlighted text event listener that is not context menu based

I noticed that when I "longclick" on a specific message in apps like FB, Viber, & Whatsapp, it will open up either a floating context menu or default action bar context menu.
What I would like to know is if it's possible to listen to a highlighted parts of text event in that particular textview and open a totally custom menu like a tooltip with different actions, not relying on context menu action mode. So far, I was only able to implement long click listening to an entire textview wherein that custom tooltip will appear.
Thanks for your advice.

Android: Handle click link event in edittext

I have an EditText where I wanted to make link (email, web, phone) clickable. I was able to do it by using
mBodyText.setMovementMethod(LinkMovementMethod.getInstance());
it works perfectly and all links open when clicking on them.
Here comes my requirement. I want to open contextual action bar (like default copy/ paste one) when user click on a link in edit text.
I know how to start a contextual action bar. But I don't know how can I catch the event when user clicks the link and to identify what kind of link it is (phone or web etc...) to show the proper menus in CAB.
After searching for hours, I come here to get the suggestion.

How to detect softkeyboard done button click in android select menu of phonegap app

This post is related to this question.
https://stackoverflow.com/a/9378676
Android select menu in a webview fires change event in every item click. I want do make that happen only after done button is clicked after changes.

how to create a popup in android?

i have a list.When i click on any item in the list a popup should appear where i can send messages(something like what happens when we click a user in gmail.A popup window comes up in the bottom and we can chat with that user).
I guess you want to add a Quick Action to your application.
You should be able to get your answer from this question.

Categories

Resources