summaryrefslogtreecommitdiff
path: root/org.fox.ttrss/src/main/java/org/fox/ttrss/util/LessBrokenWebView.java
blob: 4a3ea826984379ce1a413e92d493c756363647dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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);
	}

}