public class POBNativeTemplateView
extends RelativeLayout
| Modifier and Type | Field and Description |
|---|---|
protected ImageView |
mainImage
Native Ad Main Image with size 284x100
|
| Modifier | Constructor and Description |
|---|---|
|
POBNativeTemplateView(Context context,
AttributeSet attrs)
Used to create instances when child view is placed in XML layouts with default style or
instantiated programmatically.
|
|
POBNativeTemplateView(Context context,
AttributeSet attrs,
int defStyle)
Used to create instances when child view is placed in XML layouts with default style or
instantiated programmatically.
|
|
POBNativeTemplateView(Context context,
AttributeSet attrs,
int defStyle,
int defStyleRes)
Used to create instances when child view is placed in XML layouts with default style or
instantiated programmatically.
|
protected |
POBNativeTemplateView(Context context,
int layout)
Instantiate the native template view by inflating it with provided layout resource file.
|
| Modifier and Type | Method and Description |
|---|---|
ImageView |
getAdIcon()
Getter for the AdIcon
|
Button |
getCta()
Getter for the CTA
|
TextView |
getDescription()
Getter for the Description
|
ImageView |
getDSAIcon()
Getter for the DSAIcon
|
ImageView |
getIconImage()
Getter for the Icon ImageView
|
ImageView |
getMainImage()
Getter for the MainImage
|
ImageView |
getPrivacyIcon()
Getter for the PrivacyIcon
|
TextView |
getTitle()
Getter for the Title
|
protected void |
onAttachedToWindow()
Set tag to asset views which helps to trigger asset level clicked callback with their respective
asset ID
|
void |
setAdIcon(ImageView adIcon)
Setter for the AdIcon
|
void |
setCta(Button cta)
Setter for CTA
|
void |
setDescription(TextView description)
Setter for Description
|
void |
setDSAIcon(ImageView dsaIconImage)
Setter for the DSAIcon
|
void |
setIconImage(ImageView iconImage)
Setter for Icon ImageView
|
void |
setMainImage(ImageView mainImage)
Setter for MainImage
|
void |
setOnClickListener(OnClickListener clickListener)
Overridden onClickListener for setting the click listener on all the other assets along with the view
|
void |
setPrivacyIcon(ImageView privacyIcon)
Setter for the PrivacyIcon
|
void |
setTitle(TextView title)
Setter for Title
|
@Nullable protected ImageView mainImage
protected POBNativeTemplateView(@NonNull
Context context,
@LayoutRes
int layout)
context - Helps inflate the template view.layout - template for inflation.public POBNativeTemplateView(@NonNull
Context context,
@Nullable
AttributeSet attrs)
context - Activity contextattrs - ui attributespublic POBNativeTemplateView(@NonNull
Context context,
@Nullable
AttributeSet attrs,
int defStyle)
context - Activity contextattrs - ui attributesdefStyle - default style@RequiresApi(api=<error>)
public POBNativeTemplateView(@NonNull
Context context,
@Nullable
AttributeSet attrs,
int defStyle,
int defStyleRes)
context - Activity contextattrs - ui attributesdefStyle - default styledefStyleRes - default resource stylepublic void setOnClickListener(@Nullable
OnClickListener clickListener)
clickListener - Instance of OnClickListenerprotected void onAttachedToWindow()
public void setAdIcon(@Nullable
ImageView adIcon)
adIcon - ImageView@Nullable public ImageView getAdIcon()
public void setDSAIcon(@Nullable
ImageView dsaIconImage)
dsaIconImage - ImageView@Nullable public ImageView getDSAIcon()
public void setPrivacyIcon(@Nullable
ImageView privacyIcon)
privacyIcon - ImageView@Nullable public ImageView getPrivacyIcon()
public void setIconImage(@Nullable
ImageView iconImage)
iconImage - ImageView of Icon@Nullable public ImageView getIconImage()
public void setTitle(@Nullable
TextView title)
title - TextView@Nullable public TextView getTitle()
public void setDescription(@Nullable
TextView description)
description - TextView@Nullable public TextView getDescription()
public void setCta(@Nullable
Button cta)
cta - Button@Nullable public Button getCta()
public void setMainImage(@Nullable
ImageView mainImage)
mainImage - ImageView@Nullable public ImageView getMainImage()