Files
rr3-apk/decompiled/sources/com/ironsource/adapters/admob/banner/AdMobNativeBannerViewHandler.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

46 lines
1.9 KiB
Java

package com.ironsource.adapters.admob.banner;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.google.android.gms.ads.nativead.NativeAdView;
import com.ironsource.mediationsdk.AdapterUtils;
import com.ironsource.mediationsdk.ISBannerSize;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes2.dex */
public class AdMobNativeBannerViewHandler {
private final NativeAdView mAdView;
private FrameLayout.LayoutParams mLayoutParams;
private NativeTemplateType mTemplateType;
public FrameLayout.LayoutParams getLayoutParams() {
return this.mLayoutParams;
}
public NativeAdView getNativeAdView() {
return this.mAdView;
}
public AdMobNativeBannerViewHandler(ISBannerSize iSBannerSize, NativeTemplateType nativeTemplateType, Context context) {
this.mTemplateType = nativeTemplateType;
String description = iSBannerSize.getDescription();
description.hashCode();
switch (description) {
case "RECTANGLE":
this.mLayoutParams = new FrameLayout.LayoutParams(AdapterUtils.dpToPixels(context, 300), AdapterUtils.dpToPixels(context, 250));
break;
case "LARGE":
this.mLayoutParams = new FrameLayout.LayoutParams(AdapterUtils.dpToPixels(context, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE), AdapterUtils.dpToPixels(context, 90));
break;
case "SMART":
case "BANNER":
this.mLayoutParams = new FrameLayout.LayoutParams(AdapterUtils.dpToPixels(context, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE), AdapterUtils.dpToPixels(context, 50));
break;
}
this.mLayoutParams.gravity = 17;
this.mAdView = (NativeAdView) ((LayoutInflater) context.getSystemService("layout_inflater")).inflate(this.mTemplateType.getLayoutId(), (ViewGroup) null);
}
}