Questions tagged [clipboardmanager]

ClipboardManager is an Android service that is responsible for system-wide clipboard management.

126 questions
1
vote
3 answers

How to access old entries of Vim Clipboard?

When I want to copy a line and paste it in the current line after deleting the current line's contents, I end up pasting the same line that was deleted as the clipboard entry gets changed after pressing d
spharish
  • 275
  • 1
  • 2
  • 11
1
vote
0 answers

Clipboard button in Paste Context menu

Some apps on my phone (s4) have a "paste|clipboard" context menu when long pressing on a edit text, while others have a menu with just "paste". How do you control which menu is used in your app? Example of how I want the menu to look: Screenshot…
Faltor
  • 11
  • 3
1
vote
0 answers

cannot get the duplication

On my Samsung Note4, I use the code clear content in Clipboard firstly: ClipboardManager clipboard = (ClipboardManager) getApplicationContext().getSystemService(Context.CLIPBOARD_SERVICE); ClipData data =…
1
vote
1 answer

How to invoke the built in copy-to-clipboard visualization programatically?

Background We can use ClipboardManager to copy something to the clipboard, as such: final ClipboardManager clipboard = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE); final ClipData clipData = ClipData.newPlainText("",…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
1
vote
2 answers

Clipboardmanager Within Custom List Adapter

Want to implement an onClickListener within a custom list adapter that will copy from a textView of the listView using Clipboard. I have tried the code shown below but I always get a null when I tried to click on the textView in the listView. The…
1
vote
1 answer

Intercept app-wide copying to clipboard to implement a local only clipboard in Android

Is there a way to intercept app-wide copying to the clipboard in order to implement an app-only clipboard? I'm aware of ClipboardManager.OnPrimaryClipChanged but that is (1) system-wide, and (2) received AFTER the copying is done. I want to provide…
Daniel Ochoa
  • 1,792
  • 1
  • 16
  • 22
1
vote
0 answers

onPrimaryClipchanged() called multiple times in Android when text is copied from chrome browser

I have implemented a listener for copy event and have overridden the onPrimaryClipchanged() method This method get called thrice when some text is copied from the chrome browser. I know that this has something to do with the chrome. Is there…
codeMan
  • 5,730
  • 3
  • 27
  • 51
1
vote
2 answers

How to copy text from listview in android?

How to copy the text from ListView?For copying text i am usin clipboard manager.But,It's not working. here is my code : @Override public boolean onItemLongClick(AdapterView arg0, View arg1, int arg2, long arg3) { // TODO…
Android_dev
  • 320
  • 1
  • 7
  • 26
1
vote
1 answer

How to only paste to clipboard if it's not already there

I'm letting the user long click on a TextView and that will copy the text of the TextView to their Clipboard. I want it so that before it will actually copy the text of the TextView to their Clipboard, it will check if the last Clip on their…
Michael Yaworski
  • 13,410
  • 19
  • 69
  • 97
1
vote
1 answer

Failed resolving interface 26 Landroid/content/ClipboardManager$OnPrimaryClipChangedListener;'

I'm getting a message in my logcat stating: Failed resolving interface 26 Landroid/content/ClipboardManager$OnPrimaryClipChangedListener;' but I have no idea what might be causing it - or what I might be able to do about it. Has anyone seen this…
1
vote
2 answers

Enable Copy-paste for all android api

I'm looking for a way to copy and paste from the clipboard throughout every version of Android. Right now, I'm only aware of how to do this in APIs 11+. copy.setOnLongClickListener(new View.OnLongClickListener() { @SuppressLint({…
Raditya Kurnianto
  • 734
  • 1
  • 16
  • 42
0
votes
0 answers

Unable to Set Emoji Art to Clipboard Properly

I have made an app on ASCII Art. Now, I am in the process of incorporating Emoji Art into the app. While the functionality for setting ASCII text in the clipboard works seamlessly, I have encountered some issues when attempting to do the same with…
Vasant Raval
  • 257
  • 1
  • 12
  • 31
0
votes
0 answers

How to custom the default notification of clipboard manager in Android 13 and higher?

This is my code block to fix private inner class ViewEmojiHolder(itemView: View) : RecyclerView.ViewHolder(itemView){ var emoji: TextView = itemView.findViewById(R.id.textView_emoji) fun bind(position: Int){ val…
0
votes
1 answer

How to clear clipboard entries in Flutter or in Android Kotlin?

In my Flutter app (for Android an iOS), I want to clear either all the clipboard entries or at least the last text I copied to the clipboard (so the last entry). For the moment, I'm only focusing on the Android part. I took a look on the Clipboard…
matteoh
  • 2,810
  • 2
  • 29
  • 54
0
votes
1 answer

Save webview text to clipboard

I have created a WebView, I want to be able to copy the content of the webview with formating to the clipboard. recipeDescription.getText().toString Didn't work because the recipeDescription is a WebView not a String. …
1 2 3
8 9