mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Disable mouse scroll for WebView
This commit is contained in:
@@ -24,6 +24,8 @@ import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.util.Pair;
|
||||
import android.view.InputDevice;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.webkit.DownloadListener;
|
||||
import android.webkit.WebSettings;
|
||||
@@ -168,6 +170,14 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
||||
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 {
|
||||
void onSizeChanged(int w, int h, int ow, int oh);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user