public class CriteoNativeAd
extends java.lang.Object
| Constructor and Description |
|---|
CriteoNativeAd(NativeAssets assets,
VisibilityTracker visibilityTracker,
com.criteo.publisher.advancednative.ImpressionTask impressionTask,
ClickDetection clickDetection,
com.criteo.publisher.advancednative.NativeViewClickHandler clickOnProductHandler,
com.criteo.publisher.advancednative.NativeViewClickHandler clickOnAdChoiceHandler,
AdChoiceOverlay adChoiceOverlay,
CriteoNativeRenderer renderer,
RendererHelper rendererHelper) |
| Modifier and Type | Method and Description |
|---|---|
android.view.View |
createNativeRenderedView(android.content.Context context,
android.view.ViewGroup parent)
Create a new rendered native view.
|
java.lang.String |
getAdvertiserDescription() |
java.lang.String |
getAdvertiserDomain() |
CriteoMedia |
getAdvertiserLogoMedia() |
java.lang.String |
getCallToAction() |
java.lang.String |
getDescription() |
java.lang.String |
getLegalText() |
java.lang.String |
getPrice() |
CriteoMedia |
getProductMedia() |
java.lang.String |
getTitle() |
void |
renderNativeView(android.view.View nativeView)
Render the given native view.
|
public CriteoNativeAd(@NonNull
NativeAssets assets,
@NonNull
VisibilityTracker visibilityTracker,
@NonNull
com.criteo.publisher.advancednative.ImpressionTask impressionTask,
@NonNull
ClickDetection clickDetection,
@NonNull
com.criteo.publisher.advancednative.NativeViewClickHandler clickOnProductHandler,
@NonNull
com.criteo.publisher.advancednative.NativeViewClickHandler clickOnAdChoiceHandler,
@NonNull
AdChoiceOverlay adChoiceOverlay,
@NonNull
CriteoNativeRenderer renderer,
@NonNull
RendererHelper rendererHelper)
@NonNull public java.lang.String getTitle()
@NonNull public java.lang.String getDescription()
@NonNull public java.lang.String getPrice()
@NonNull public java.lang.String getCallToAction()
@NonNull public CriteoMedia getProductMedia()
@NonNull public java.lang.String getAdvertiserDomain()
@NonNull public java.lang.String getAdvertiserDescription()
@NonNull public CriteoMedia getAdvertiserLogoMedia()
@NonNull public java.lang.String getLegalText()
@NonNull
public android.view.View createNativeRenderedView(@NonNull
android.content.Context context,
@Nullable
android.view.ViewGroup parent)
The native view is directly usable. You can add it to your view hierarchy.
Note that parent is given so that inflated views are setup with the ViewGroup.LayoutParams corresponding to their parent. See CriteoNativeRenderer for more information.
context - android contextparent - optional parent to get layout params frompublic void renderNativeView(@NonNull
android.view.View nativeView)
This view should come from createNativeRenderedView(Context, ViewGroup) or from CriteoNativeLoader.createEmptyNativeView(Context, ViewGroup).
It is safe to call this method many times on the same view or on different views. This will render many times the ad.
See CriteoNativeRenderer for more information.
nativeView - native you to render