|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sponsorpay.sdk.android.publisher.OfferBanner
public class OfferBanner
Encloses an offer advertisement banner returned by the SponsorPay server. Contains the data returned by the server and can generate a banner view to be added to a view hierarchy.
Nested Class Summary | |
---|---|
static class |
OfferBanner.AdShape
Encloses a shape for an advertisement banner: width, height and string description. |
Field Summary | |
---|---|
static java.lang.String |
LOG_TAG
|
private java.lang.String |
mBaseUrl
Base URL used by the banner WebView to load resources referenced from its HTML content. |
private Context |
mContext
Android application context. |
private java.lang.String[] |
mCookies
Cookies used by the WebView when requesting referenced resources to the server. |
private java.lang.String |
mHtmlContent
HTML content of the banner. |
private View |
mOfferBannerView
View responsible for displaying the banner. |
private OfferBanner.AdShape |
mShape
OfferBanner.AdShape defining the dimensions of this banner. |
static OfferBanner.AdShape |
SP_AD_SHAPE_320X50
OfferBanner.AdShape defining a 320 x 50 banner shape. |
Constructor Summary | |
---|---|
OfferBanner(Context context,
java.lang.String baseUrl,
java.lang.String htmlContent,
java.lang.String[] cookies,
OfferBanner.AdShape shape)
Constructor. |
Method Summary | |
---|---|
private int |
convertDevicePixelsIntoPixelsMeasurement(float dps)
Converts device pixels into screen pixels. |
View |
getBannerView(Activity hostActivity)
Initializes and returns an Android View containing the banner which can be added to a view hierarchy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOG_TAG
public static final OfferBanner.AdShape SP_AD_SHAPE_320X50
OfferBanner.AdShape
defining a 320 x 50 banner shape.
private Context mContext
private java.lang.String mBaseUrl
private java.lang.String mHtmlContent
private java.lang.String[] mCookies
private View mOfferBannerView
private OfferBanner.AdShape mShape
OfferBanner.AdShape
defining the dimensions of this banner.
Constructor Detail |
---|
public OfferBanner(Context context, java.lang.String baseUrl, java.lang.String htmlContent, java.lang.String[] cookies, OfferBanner.AdShape shape)
context
- Android application context.baseUrl
- Base URL used by the banner WebView to load resources referenced from its HTML
content.htmlContent
- HTML content of the banner.cookies
- Cookies used by the WebView when requesting referenced resources to the server.shape
- OfferBanner.AdShape
defining the dimensions of this banner.Method Detail |
---|
public View getBannerView(Activity hostActivity)
hostActivity
- The Android activity which contains the view hierarchy to which the banner will be
added. This activity will be used to launch a new activity if the user taps on the
banner.
private int convertDevicePixelsIntoPixelsMeasurement(float dps)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |