From ac96ae00d3fa887a7bb1ad0b67821cadd60fe887 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Nov 2013 20:07:17 +0400 Subject: add workaround for webview not working correctly inside viewpager or w/e (the no rect test based nodes found issue) thanks, google engineers, amazing work --- src/org/fox/ttrss/util/LessBrokenWebView.java | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/org/fox/ttrss/util/LessBrokenWebView.java (limited to 'src/org/fox/ttrss/util/LessBrokenWebView.java') diff --git a/src/org/fox/ttrss/util/LessBrokenWebView.java b/src/org/fox/ttrss/util/LessBrokenWebView.java new file mode 100644 index 00000000..c6cab513 --- /dev/null +++ b/src/org/fox/ttrss/util/LessBrokenWebView.java @@ -0,0 +1,37 @@ +package org.fox.ttrss.util; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.webkit.WebView; + +public class LessBrokenWebView extends WebView { + + public LessBrokenWebView(Context context) { + super(context); + // TODO Auto-generated constructor stub + } + + public LessBrokenWebView(Context context, AttributeSet attrs) { + super(context, attrs); + // TODO Auto-generated constructor stub + } + + public LessBrokenWebView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + // TODO Auto-generated constructor stub + } + + @Override + public boolean onTouchEvent(MotionEvent event) { + + if (event.getAction() == MotionEvent.ACTION_DOWN) { + int temp_ScrollY = getScrollY(); + scrollTo(getScrollX(), getScrollY() + 1); + scrollTo(getScrollX(), temp_ScrollY); + } + + return super.onTouchEvent(event); + } + +} -- cgit v1.2.3-54-g00ecf