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
精彩评论