我在复制粘贴上遇到了问题,在我的类中长时间点击扩展Android WebView的文本。
我能复制,但粘贴不起作用。在调查过程中,网上某个地方提出了调查android.webkit.WebViewClassic的建议。
在WebViewClassic中,有一个名为pasteFromClipboard()的方法。我认为实际的代码粘贴发生在该方法中,但不确定。
那么,谁能告诉我我是对的,也就是说,在WebViewClassic的调查对我来说是否值得?
如果是,请告诉我WebView和WebViewClassic之间的关系是什么,即在WebView中点击多长时间到WebViewClassic。
对不起,我不能公开我的代码或日志。
发布于 2013-11-12 20:59:20
WebViewClassic是WebView的默认WebViewProvider。在执行说明中:
The WebView is a thin API class that delegates its public API to a backend WebViewProvider
class instance. WebView extends {@link AbsoluteLayout} for backward compatibility reasons.
Methods are delegated to the provider implementation: all public API methods introduced in this
file are fully delegated, whereas public and protected methods from the View base classes are
only delegated where a specific need exists for them to do so.基本上,触摸处理是从WebView转发到WebViewClassic实例的。如果您阅读它的onTouchEvent实现及其内部WebViewInputDispatcher实现PrivateHandler,您可以跟踪触摸处理将导致在WebViewClassic实例上调用pasteFromClipboard()的位置。
所以是的,你是对的。当您点击PastePopupWindow上的“粘贴”按钮时,将调用WebViewClassic的pasteFromClipboard();方法。
https://stackoverflow.com/questions/19034294
复制相似问题