mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +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.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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue