当前位置:编程学习 > wap >>

TextView拖选并复制,求指导

有一个TextView (称为tv),在tv上长按后弹出菜单,菜单有个自定义的选择项是 “复制选定内容”,点击选项后可以对tv的文字进行拖选,拖选完毕后,自定复制到粘贴板。请问如何实现?求指点!! --------------------编程问答-------------------- 请问LZ 解决了没? --------------------编程问答-------------------- Android API中的一段
To allow users to copy some or all of the TextView's value and paste it somewhere else, set the XML attribute android:textIsSelectable to "true" or call setTextIsSelectable(true). The textIsSelectable flag allows users to make selection gestures in the TextView, which in turn triggers the system's built-in copy/paste controls. --------------------编程问答-------------------- 楼上已经说了。。
android:textIsSelectable to "true" or call setTextIsSelectable(true)
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,