YaftaMobileBannerView

The YaftaMobileBannerView provides a view that displays banner advertisements to the user.

Extends: FrameLayout
Implements : YaftaMobileAdView
Package: com.mustamara.yaftamobile.sdk.ads.banner
Constructors

 

YaftaMobileBannerView

Construct 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.

YaftaMobileBannerView

Construct an YaftaMobileBannerView from an XML layout.

public YaftaMobileBannerView(Context context, AttributeSet attrs)

Parameter Description
context The Context the YaftaMobileBannerView is running in.
attrs  

YaftaMobileBannerView

Construct 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

 

requestAd

Request 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.
Returns

-


setAdListener

Sets 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.
Returns

-


getAdSize

Gets the ad size

public AdSize getAdSize()

Parameter Description
   
Returns

Current ad size to load.


setRefreshRate

Sets 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

-


getRefreshRate

Gets the refresh rate

public int getRefreshRate()

Parameter Description
   
Returns

Current refresh rate.


setAutoRefresh

Specifies 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
   
Returns

-