I added a progressbar in my custom webview, but when I scroll the view, it caused this error 

This is my onScrollChanged method:
@Override
protected void onScrollChanged(int left, int top, int oldLeft, int oldTop) {
        LayoutParams layoutParams = (LayoutParams)  progressbar.getLayoutParams();
        layoutParams.leftMargin = left;
        layoutParams.topMargin = top;
        progressbar.setLayoutParams(layoutParams);
        super.onScrollChanged(left, top, oldLeft, oldTop);
    }
This is my imports:
    import com.fccs.library.R; 
import com.fccs.library.callback.SingleButtonCallBack; 
import com.fccs.library.notice.DialogUtils; 
import com.tencent.smtt.export.external.interfaces.JsResult; 
import com.tencent.smtt.sdk.WebSettings; 
import com.tencent.smtt.sdk.WebView; 
import android.annotation.SuppressLint; 
import android.content.Context; 
import android.content.Intent; 
import android.net.Uri; 
import android.util.AttributeSet; 
import android.view.KeyEvent; 
import android.view.View; 
import android.widget.ProgressBar;
 
     
     
    