I want to add option on clipboard like Chrome has when we select URL
Is it possible to add option of my application in Clipboard?
Thanks.
I want to add option on clipboard like Chrome has when we select URL
Is it possible to add option of my application in Clipboard?
Thanks.
I don't know anything about Xamarin. But in native Android it's done in this way.
Add an intent filter to an Activity in your manifest:
<activity
android:name=".ProcessTextActivity"
android:label="@string/process_text_action_name">
<intent-filter>
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
Text from android:label
will be shown in context menu
It's described in details in this Android developers blog post
Another question on the same topic: How to use the new Android M feature of "Text Selection" to be offered from outside of your app?
For each TextView
you want to customize the menu you need to pass your own android.view.ActionMode.Callback
to TextView.setCustomSelectionActionModeCallback
function.
In your implementation of android.view.ActionMode.Callback
you are free to add/edit/remove items as you wish.
UPDATE: Didn’t realize that this issue is on Xamarin platform. I guess the answer should be similar.