diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2013-11-19 20:07:17 +0400 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2013-11-19 20:07:17 +0400 |
| commit | ac96ae00d3fa887a7bb1ad0b67821cadd60fe887 (patch) | |
| tree | 1ac7c0d27c465374c542f1f1c03459a620d6921f /src/org/fox/ttrss/util/LessBrokenWebView.java | |
| parent | 12b784d06b380894348a793d106b586ba1f79f17 (diff) | |
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
Diffstat (limited to 'src/org/fox/ttrss/util/LessBrokenWebView.java')
| -rw-r--r-- | src/org/fox/ttrss/util/LessBrokenWebView.java | 37 |
1 files changed, 37 insertions, 0 deletions
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);
+ }
+
+}
|