The YaftaMobileBannerView provides a view that displays banner advertisements to the user.
| Extends: | java.lang.Object |
| Implements: | YaftaMobileAdView |
| Package: | com.mustamara.yaftamobile.sdk.ads.banner |
YaftaMobileBannerViewConstruct an YaftaMobileBannerView from code.
public YaftaMobileBannerView (Context context,AdSize adSize)
|Parameter | Description| |-|-| |context|The Context the YaftaMobileBannerView is running in.| |adSize|Size of the ad to load.|
YaftaMobileBannerViewConstruct an YaftaMobileBannerView from an XML layout.
public YaftaMobileBannerView(Context context, AttributeSet attrs)
|Parameter | Description| |-|-| |context|The Context the YaftaMobileBannerView is running in.| |attrs||
YaftaMobileBannerViewConstruct an YaftaMobileBannerView from an XML layout.
public YaftaMobileBannerView(Context context, AttributeSet attrs, int defStyle)
|Parameter | Description| |-|-| |context|The Context the YaftaMobileBannerView is running in.| |attrs|| |defStyle|| |Public Methods||
requestAdRequest an ad to be fetched.
public void requestAd(AdRequest adRequest)
|Parameter | Description| |-|-| |adRequest|The AdRequest object containing the required information about the ad to fetch.|
setAdListenerSets an AdListener for this YaftaMobileBannerView.
public void setAdListener(AdListener adListener)
|Parameter | Description| |-|-| |adListener|The AdListener that will be notified of events occured during the ad life-cycle.|
getAdSizeGets the ad size
public AdSize getAdSize()
|Parameter | Description| |-|-| |||
Returns
Current ad size to load.
setRefreshRateSets The time interval which determines how often a new ad will be loaded.
public void setRefreshRate(int refreshRate)
|Parameter | Description| |-|-| |refreshRate|The time interval in seconds|
Returns
getRefreshRateGets the refresh rate
public int getRefreshRate()
|Parameter | Description| |-|-| |||
Returns Current refresh rate.
setAutoRefreshSpecifies whether the YaftaMobileBannerView should automatically refreshes and displays a new ad. `` public void setAutoRefresh(boolean autoRefresh)
|Parameter | Description|
|-|-|
|autoRefresh|The autoRefresh to set|
**Returns**
-
##### `isAutoRefresh`
Checks if auto refresh is enabled.
public boolean isAutoRefresh()
|Parameter | Description|
|-|-|
|||
**Returns**
true if auto refresh is enabled and false otherwise.
##### `destroy`
Destroys the YaftaMobileBannerView and releases all resources. This method should be called in the parent Activity's onDestroy() method.
public void destroy() ``` |Parameter | Description| |-|-| |||