Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 AppLovinAdView.java 源代码,内容仅作参考
package com.applovin.adview;
import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
import com.applovin.impl.adview.b;
import com.applovin.impl.sdk.y;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdSize;
import com.applovin.sdk.AppLovinSdk;
public class AppLovinAdView extends RelativeLayout {
public static final String NAMESPACE = "http://schemas.applovin.com/android/1.0";
private b f25092a;
public AppLovinAdView(AppLovinAdSize appLovinAdSize, Context context) {
this(appLovinAdSize, (String) null, context);
}
private void a(AppLovinAdSize appLovinAdSize, String str, AppLovinSdk appLovinSdk, Context context, AttributeSet attributeSet) {
if (!isInEditMode()) {
b bVar = new b();
this.f25092a = bVar;
bVar.a(this, context, appLovinAdSize, str, appLovinSdk, attributeSet);
return;
}
a(attributeSet, context);
}
public void destroy() {
b bVar = this.f25092a;
if (bVar != null) {
bVar.f();
}
}
public b getController() {
return this.f25092a;
}
public AppLovinAdSize getSize() {
b bVar = this.f25092a;
if (bVar != null) {
return bVar.b();
}
return null;
}
public String getZoneId() {
b bVar = this.f25092a;
if (bVar != null) {
return bVar.c();
}
return null;
}
public void loadNextAd() {
b bVar = this.f25092a;
if (bVar != null) {
bVar.a();
} else {
y.g("AppLovinSdk", "Unable to load next ad: AppLovinAdView is not initialized.");
}
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
b bVar = this.f25092a;
if (bVar != null) {
bVar.i();
}
}
@Override
public void onDetachedFromWindow() {
b bVar = this.f25092a;
if (bVar != null) {
bVar.j();
}
super.onDetachedFromWindow();
}
public void pause() {
b bVar = this.f25092a;
if (bVar != null) {
bVar.d();
}
}
public void renderAd(AppLovinAd appLovinAd) {
b bVar = this.f25092a;
if (bVar != null) {
bVar.a(appLovinAd);
}
}
public void resume() {
b bVar = this.f25092a;
if (bVar != null) {
bVar.e();
}
}
public void setAdClickListener(AppLovinAdClickListener appLovinAdClickListener) {
b bVar = this.f25092a;
if (bVar != null) {
bVar.a(appLovinAdClickListener);
}
}
public void setAdDisplayListener(AppLovinAdDisplayListener appLovinAdDisplayListener) {
b bVar = this.f25092a;
if (bVar != null) {
bVar.a(appLovinAdDisplayListener);
}
}
public void setAdLoadListener(AppLovinAdLoadListener appLovinAdLoadListener) {
b bVar = this.f25092a;
if (bVar != null) {
bVar.a(appLovinAdLoadListener);
}
}
public void setAdViewEventListener(AppLovinAdViewEventListener appLovinAdViewEventListener) {
b bVar = this.f25092a;
if (bVar != null) {
bVar.a(appLovinAdViewEventListener);
}
}
public void setExtraInfo(@NonNull String str, @Nullable Object obj) {
if (str != null) {
b bVar = this.f25092a;
if (bVar != null) {
bVar.a(str, obj);
return;
}
return;
}
throw new IllegalArgumentException("No key specified");
}
@Override
public String toString() {
return "AppLovinAdView{zoneId='" + getZoneId() + "\", size=" + getSize() + '}';
}
public AppLovinAdView(AppLovinAdSize appLovinAdSize, String str, Context context) {
super(context);
a(appLovinAdSize, str, null, context, null);
}
public AppLovinAdView(AppLovinSdk appLovinSdk, AppLovinAdSize appLovinAdSize, Context context) {
this(appLovinSdk, appLovinAdSize, null, context);
}
public AppLovinAdView(AppLovinSdk appLovinSdk, AppLovinAdSize appLovinAdSize, String str, Context context) {
super(context.getApplicationContext());
a(appLovinAdSize, str, appLovinSdk, context, null);
}
private void a(AttributeSet attributeSet, Context context) {
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
int i11 = displayMetrics.widthPixels;
int applyDimension = (int) TypedValue.applyDimension(1, 50.0f, displayMetrics);
TextView textView = new TextView(context);
textView.setBackgroundColor(Color.rgb(220, 220, 220));
textView.setTextColor(ViewCompat.MEASURED_STATE_MASK);
textView.setText("AppLovin Ad");
textView.setGravity(17);
addView(textView, i11, applyDimension);
}
public AppLovinAdView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public AppLovinAdView(Context context, AttributeSet attributeSet, int i11) {
super(context, attributeSet, i11);
a(null, null, null, context, attributeSet);
}
}