com.vpon.adon.android
Class AdView

java.lang.Object
  extended by RelativeLayout
      extended by com.vpon.adon.android.AdView

public final class AdView
extends RelativeLayout

A view containing an ad.
AdOn SDK just support HVGA and WVGA device.

Author:
Shark

Constructor Summary
AdView(Context context)
          Simple constructor to use when creating an advertisement view from code (not from a layout XML file).
AdView(Context context, AttributeSet attrs)
          Constructor that is called when inflating an advertisment view from XML.
AdView(Context context, AttributeSet attrs, int defStyle)
          Constructor that is called when inflating an advertisment view from XML.
 
Method Summary
 java.lang.String getVersion()
          The String of AdOn SDK version.
 void pauseAdAutoRefresh()
          Pause this view auto refresh ad function.
 void refreshAd()
          Updates this view with a new ad.
 void restartAdAutoRefresh()
          Restart this view auto refresh ad function.
 void setAdListener(AdListener listener)
          Makes the listener receive notifications of when a new ad has arrived from AdOn and this view is about to display it.
 void setLicenseKey(java.lang.String licenseKey, boolean autoRefreshAd)
          Sets the licenseKey, autoRefreshAd, testMode to start first AdOn Ad request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdView

public AdView(Context context)
Simple constructor to use when creating an advertisement view from code (not from a layout XML file).


AdView

public AdView(Context context,
              AttributeSet attrs)
Constructor that is called when inflating an advertisment view from XML.


AdView

public AdView(Context context,
              AttributeSet attrs,
              int defStyle)
Constructor that is called when inflating an advertisment view from XML.

Method Detail

getVersion

public java.lang.String getVersion()
The String of AdOn SDK version.

Returns:
SDK Version

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey,
                          boolean autoRefreshAd)
Sets the licenseKey, autoRefreshAd, testMode to start first AdOn Ad request.

Parameters:
licensekey - the unique publisher ID assigned to this application by AdOn.
autoRefreshAd - cause AdOn auto-refresh Ad during default time.

setAdListener

public void setAdListener(AdListener listener)
Makes the listener receive notifications of when a new ad has arrived from AdOn and this view is about to display it. The listener is a good place to change the colors of an ad or hide the view when there is no ad.

Parameters:
adListener - is the object to receive event notifications or null to stop getting notifications.
See Also:
AdListener

refreshAd

public void refreshAd()
Updates this view with a new ad. This will be ignored if autoRefreshAd(boolean) parameter setting is true.


pauseAdAutoRefresh

public void pauseAdAutoRefresh()
Pause this view auto refresh ad function. This will be ignored if autoRefreshAd(boolean) parameter setting is true.


restartAdAutoRefresh

public void restartAdAutoRefresh()
Restart this view auto refresh ad function. This will be ignored if state not in pause auto refresh ad state.

See Also:
pauseAdAutoRefresh()