Files
rr3-apk/decompiled/sources/com/unity3d/scar/adapter/v2000/scarads/ScarBannerAd.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

53 lines
2.2 KiB
Java

package com.unity3d.scar.adapter.v2000.scarads;
import android.content.Context;
import android.widget.RelativeLayout;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.query.QueryInfo;
import com.unity3d.scar.adapter.common.IAdsErrorHandler;
import com.unity3d.scar.adapter.common.IScarBannerAdListenerWrapper;
import com.unity3d.scar.adapter.common.scarads.IScarLoadListener;
import com.unity3d.scar.adapter.common.scarads.ScarAdMetadata;
/* loaded from: classes4.dex */
public class ScarBannerAd extends ScarAdBase<AdView> {
private AdView _adView;
private RelativeLayout _bannerView;
private int _height;
private int _width;
public ScarBannerAd(Context context, QueryInfo queryInfo, RelativeLayout relativeLayout, ScarAdMetadata scarAdMetadata, int i, int i2, IAdsErrorHandler iAdsErrorHandler, IScarBannerAdListenerWrapper iScarBannerAdListenerWrapper) {
super(context, scarAdMetadata, queryInfo, iAdsErrorHandler);
this._bannerView = relativeLayout;
this._width = i;
this._height = i2;
this._adView = new AdView(this._context);
this._scarAdListener = new ScarBannerAdListener(iScarBannerAdListenerWrapper, this);
}
public void removeAdView() {
AdView adView;
RelativeLayout relativeLayout = this._bannerView;
if (relativeLayout == null || (adView = this._adView) == null) {
return;
}
relativeLayout.removeView(adView);
}
@Override // com.unity3d.scar.adapter.v2000.scarads.ScarAdBase
public void loadAdInternal(AdRequest adRequest, IScarLoadListener iScarLoadListener) {
AdView adView;
RelativeLayout relativeLayout = this._bannerView;
if (relativeLayout == null || (adView = this._adView) == null) {
return;
}
relativeLayout.addView(adView);
this._adView.setAdSize(new AdSize(this._width, this._height));
this._adView.setAdUnitId(this._scarAdMetadata.getAdUnitId());
this._adView.setAdListener(((ScarBannerAdListener) this._scarAdListener).getAdListener());
this._adView.loadAd(adRequest);
}
}