private void init() {
OnTrimMemoryListener.init(mContext);
mWebView.setWillNotDraw(false);
- mWebView.setFocusable(true);
- mWebView.setFocusableInTouchMode(true);
mWebView.setClickable(true);
mWebView.setLongClickable(true);
return false;
}
- if (!mWebView.isFocused()) {
- mWebView.requestFocus();
- }
-
if (mInputDispatcher == null) {
return false;
}
+ if (mWebView.isFocusable() && mWebView.isFocusableInTouchMode()
+ && !mWebView.isFocused()) {
+ mWebView.requestFocus();
+ }
+
if (mInputDispatcher.postPointerEvent(ev, getScrollX(),
getScrollY() - getTitleHeight(), mZoomManager.getInvScale())) {
mInputDispatcher.dispatchUiEvents();
<style name="Widget.WebView">
<item name="android:focusable">true</item>
+ <item name="android:focusableInTouchMode">true</item>
<item name="android:scrollbars">horizontal|vertical</item>
</style>