开发者

Text selection bind in android 3.1

开发者 https://www.devze.com 2023-03-13 13:49 出处:网络
When you select text in android, a toolbar is opened with COPY & PASTE &开发者_如何学编程amp; WEB SEARCH.

When you select text in android, a toolbar is opened with COPY & PASTE &开发者_如何学编程amp; WEB SEARCH. is there a way i can add stuff there via the API somehow?

Thanks!


What is the context of the text you are selecting? Is it in an EditText box? Or just highlighted text on a web page?

If it is an EditText, I think the answer is no.

http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int, android.view.KeyEvent)

This is the onLongPress of the EditText, where you can choose to either handle the event yourself or pass it on to be handled internally. It sounds like you want to be able to modify the way it handles the event internally, which I don't think you can do. The only way would be to implement your own spinner popup, with all of those options + yours.

0

精彩评论

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

关注公众号