jimu-decompiled/sources/com/ubtech/view/widget/AWebView.java
2025-05-13 19:24:51 +02:00

59 lines
1.6 KiB
Java

package com.ubtech.view.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.webkit.WebView;
/* loaded from: classes2.dex */
public class AWebView extends WebView {
private int a;
private WebViewScrollChangeListener b;
public interface WebViewScrollChangeListener {
void a(int i, int i2, int i3, int i4);
void b(int i, int i2, int i3, int i4);
void c(int i, int i2, int i3, int i4);
}
public AWebView(Context context) {
super(context);
this.a = 150;
}
@Override // android.webkit.WebView, android.view.View
protected void onScrollChanged(int i, int i2, int i3, int i4) {
super.onScrollChanged(i, i2, i3, i4);
if (this.b == null) {
return;
}
if (Math.abs((getContentHeight() * getScale()) - (getHeight() + getScrollY())) < this.a) {
this.b.b(i, i2, i3, i4);
} else if (getScrollY() == 0) {
this.b.a(i, i2, i3, i4);
} else {
this.b.c(i, i2, i3, i4);
}
}
public void setOnScrollChangeListener(WebViewScrollChangeListener webViewScrollChangeListener) {
this.b = webViewScrollChangeListener;
}
public AWebView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.a = 150;
}
public AWebView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.a = 150;
}
public AWebView(Context context, AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
this.a = 150;
}
}