package com.shengfang.procuratorate.View; import android.content.Context; import android.util.AttributeSet; import android.webkit.WebView; public class MyWebview extends WebView { public MyWebview(Context context) { super(context); } public MyWebview(Context context, AttributeSet attrs) { super(context, attrs); } public MyWebview(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Override public boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) { return false; } /** * 使WebView不可滚动 * */ @Override public void scrollTo(int x, int y){ super.scrollTo(0,0); } }
自定义webview 使之不能滑动
最新推荐文章于 2024-04-02 15:39:44 发布