-
public final class AdViewUtils
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAdViewUtils.PbFindSizeListenerpublic interfaceAdViewUtils.PbScaleAppliedListenerCallback used with findPrebidCreativeSize.Invoked after the corrective WebView initial-scale has been applied (see fixZoomIn).
Best-effort: called at most once, and only when a corrective scale is actually applied. It isnot called when no scale is applied or on the failure path, so it is not a guaranteed completionsignal — see findPrebidCreativeSize.
public interfaceAdViewUtils.CacheIdResult
-
Method Summary
Modifier and Type Method Description static voidfindPrebidCreativeSize(@Nullable() View adView, AdViewUtils.PbFindSizeListener handler)static voidfindPrebidCreativeSize(@Nullable() View adView, AdViewUtils.PbFindSizeListener handler, @Nullable() AdViewUtils.PbScaleAppliedListener scaleListener)Behaves like findPrebidCreativeSize and additionally notifies {@code scaleListener}after the corrective WebView initial-scale (see fixZoomIn) hasbeen applied.static voidfindCacheId(WebView webView, AdViewUtils.CacheIdResult onResult)static voidfindNative(@NonNull() Object object, @NonNull() PrebidNativeAdListener listener)This API can be used to find if the passed object contains info to retreive valid cached Native response or not,and notifies using the PrebidNativeAdListener -
-
Method Detail
-
findPrebidCreativeSize
static void findPrebidCreativeSize(@Nullable() View adView, AdViewUtils.PbFindSizeListener handler)
-
findPrebidCreativeSize
static void findPrebidCreativeSize(@Nullable() View adView, AdViewUtils.PbFindSizeListener handler, @Nullable() AdViewUtils.PbScaleAppliedListener scaleListener)
Behaves like findPrebidCreativeSize and additionally notifies
{@code scaleListener}after the corrective WebView initial-scale (see fixZoomIn) hasbeen applied.Delivery of
{@code scaleListener}is best-effort: it is invoked at most once, and only when acorrective scale is actually applied. It is NOT invoked when no scale is applied (for examplewhen the WebView is not yet sized, or its content height never resolves) nor on the failurepath. Callers must not treat it as a guaranteed completion signal; if they gate UI on it theyshould pair it with their own fallback (such as a timeout). Passing{@code null}is equivalentto findPrebidCreativeSize.
-
findCacheId
static void findCacheId(WebView webView, AdViewUtils.CacheIdResult onResult)
-
findNative
static void findNative(@NonNull() Object object, @NonNull() PrebidNativeAdListener listener)
This API can be used to find if the passed object contains info to retreive valid cached Native response or not,and notifies using the PrebidNativeAdListener
- Parameters:
object- instances of Google Native Adslistener- to notify the validity of passed object via @onPrebidNativeLoaded, #onPrebidNativeNotFound, #onPrebidNativeNotValid
-
-
-
-