mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-04 06:20:26 +00:00
Disable mouse scroll for WebView
This commit is contained in:
parent
f23a3c06f6
commit
65b871eb42
1 changed files with 10 additions and 0 deletions
|
@ -24,6 +24,8 @@ import android.content.SharedPreferences;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
import android.view.InputDevice;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.webkit.DownloadListener;
|
import android.webkit.DownloadListener;
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
|
@ -168,6 +170,14 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onGenericMotionEvent(MotionEvent event) {
|
||||||
|
if (event.getAction() == MotionEvent.ACTION_SCROLL &&
|
||||||
|
(event.getSource() & InputDevice.SOURCE_MOUSE) != 0)
|
||||||
|
return false;
|
||||||
|
return super.onGenericMotionEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
interface IWebView {
|
interface IWebView {
|
||||||
void onSizeChanged(int w, int h, int ow, int oh);
|
void onSizeChanged(int w, int h, int ow, int oh);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue