Google is committed to advancing racial equity for Black communities. See how.

BaseAdView

public abstract class BaseAdView extends ViewGroup
Known Direct Subclasses

The base ad View for displaying banner ads.

XML Attribute Summary

Inherited Constant Summary

Inherited Field Summary

Protected Constructor Summary

BaseAdView(Context context, int adViewType)
Constructs a BaseAdView from code.
BaseAdView(Context context, AttributeSet attrs, int adViewType)
Constructs a BaseAdView from an XML layout.
BaseAdView(Context context, AttributeSet attrs, boolean allowMultipleAdSizes)
Constructs a BaseAdView from an XML layout.
BaseAdView(Context context, AttributeSet attrs, int defStyle, int adViewType)
Constructs a BaseAdView from an XML layout.
BaseAdView(Context context, AttributeSet attrs, int defStyle, int adViewType, boolean allowMultipleAdSizes)
Constructs a BaseAdView from an XML layout.

Public Method Summary

void
destroy()
Destroys the ad view.
AdListener
getAdListener()
Returns the AdListener for this ad view.
AdSize
getAdSize()
Returns the size of the ad.
String
getAdUnitId()
Returns the ad unit ID.
OnPaidEventListener
getOnPaidEventListener()
Gets the OnPaidEventListener for this ad view.
ResponseInfo
getResponseInfo()
Returns the ResponseInfo object for the loaded ad.
boolean
isLoading()
Returns true if the ad is loading.
void
loadAd(AdRequest adRequest)
Loads an ad.
void
pause()
Pauses any extra processing associated with this ad view.
void
resume()
Resumes an ad view after a previous call to pause().
void
setAdListener(AdListener adListener)
Sets an AdListener for this ad view.
void
setAdSize(AdSize adSize)
Sets the size of the ad.
void
setAdUnitId(String adUnitId)
Sets the ad unit ID.
void
setOnPaidEventListener(OnPaidEventListener listener)
Registers a callback to be invoked when this ad is estimated to have earned money.

Protected Method Summary

void
onLayout(boolean changed, int left, int top, int right, int bottom)
void
onMeasure(int widthMeasureSpec, int heightMeasureSpec)

Inherited Method Summary