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
,您可以跟踪触摸处理将导致调用pasteFromClipboard()
WebViewClassic 实例的位置。
所以是的,你是对的。当您点击 PastePopupWindow 上的粘贴按钮时,将会调用 WebViewClassic 的pasteFromClipboard();
方法。