MD5 校验值:d53ec1a251294bef920c76a08ee856d9
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 com.applovin.impl.adview.b; import com.applovin.impl.sdk.x; 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 n; 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.n = bVar; bVar.a(this, context, appLovinAdSize, str, appLovinSdk, attributeSet); return; } a(attributeSet, context); } public void destroy() { b bVar = this.n; if (bVar != null) { bVar.destroy(); } } public b getController() { return this.n; } public AppLovinAdSize getSize() { b bVar = this.n; if (bVar != null) { return bVar.getSize(); } return null; } public String getZoneId() { b bVar = this.n; if (bVar != null) { return bVar.getZoneId(); } return null; } public void loadNextAd() { b bVar = this.n; if (bVar != null) { bVar.loadNextAd(); } else { x.E("AppLovinSdk", "Unable to load next ad: AppLovinAdView is not initialized."); } } @Override public void onAttachedToWindow() { super.onAttachedToWindow(); b bVar = this.n; if (bVar != null) { bVar.onAttachedToWindow(); } } @Override public void onDetachedFromWindow() { b bVar = this.n; if (bVar != null) { bVar.onDetachedFromWindow(); } super.onDetachedFromWindow(); } public void pause() { b bVar = this.n; if (bVar != null) { bVar.pause(); } } public void renderAd(AppLovinAd appLovinAd) { b bVar = this.n; if (bVar != null) { bVar.renderAd(appLovinAd); } } public void resume() { b bVar = this.n; if (bVar != null) { bVar.resume(); } } public void setAdClickListener(AppLovinAdClickListener appLovinAdClickListener) { b bVar = this.n; if (bVar != null) { bVar.setAdClickListener(appLovinAdClickListener); } } public void setAdDisplayListener(AppLovinAdDisplayListener appLovinAdDisplayListener) { b bVar = this.n; if (bVar != null) { bVar.setAdDisplayListener(appLovinAdDisplayListener); } } public void setAdLoadListener(AppLovinAdLoadListener appLovinAdLoadListener) { b bVar = this.n; if (bVar != null) { bVar.setAdLoadListener(appLovinAdLoadListener); } } public void setAdViewEventListener(AppLovinAdViewEventListener appLovinAdViewEventListener) { b bVar = this.n; if (bVar != null) { bVar.setAdViewEventListener(appLovinAdViewEventListener); } } public void setExtraInfo(String str, Object obj) { if (str != null) { b bVar = this.n; if (bVar != null) { bVar.setExtraInfo(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 i = 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(-16777216); textView.setText("AppLovin Ad"); textView.setGravity(17); addView(textView, i, applyDimension); } public AppLovinAdView(Context context, AttributeSet attributeSet) { this(context, attributeSet, 0); } public AppLovinAdView(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); a(null, null, null, context, attributeSet); } }