开发者

I copy and paste image on EditText, but EditText show me 'obj'

开发者 https://www.devze.com 2022-12-17 13:30 出处:网络
Adding an image on EditText works fine.However, copying an image is another problem. When I insert an image on EditText by using ImageSpan it shows correctly, but I copy inserted image, EditText show

Adding an image on EditText works fine. However, copying an image is another problem.

When I insert an image on EditText by using ImageSpan it shows correctly, but I copy inserted image, EditText shows me only 'obj'.开发者_Python百科

Is there somebody who know how to solve this problem?


According to the documentation for the ClipboardManager currently you can only retrieve text from the clipboard so I don't think it will be possible for you to paste an image.

You can hook into the paste into the EditText using the onTextContextMenuItem() method so it may be possible to create the ImageSpan manually but I don't think there will be an image in the Clipboard to paste.


I think android 2.4 will merge 3.0's ClipboardManager ability to copy any intent data. http://gametest2.ruixinonline.com/docs/reference/android/content/ClipboardManager.html

0

精彩评论

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