|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectActivity
com.sponsorpay.sdk.android.publisher.InterstitialActivity
public class InterstitialActivity
Shows the SponsorPay mobile interstitial embedded in a WebView.
Will retrieve the interstitial's initial html content from the EXTRA_INITIAL_CONTENT_KEY
encoded into the calling intent, and will load dependent content referenced with relative links
using the base URL encoded as EXTRA_BASE_DOMAIN_KEY into the calling intent. The http
cookie(s) to use will be retrieved from the String array encoded as extra
EXTRA_COOKIESTRINGS_KEY
The boolean value encoded as EXTRA_SHOULD_STAY_OPEN_KEY into the calling intent will
determine the activity's behavior when the user is redirected outside the application. The
default behavior is to close the interstitial.
| Field Summary | |
|---|---|
private static int |
BACKGROUND_DRAWABLE_ALPHA
|
private static int |
BACKGROUND_DRAWABLE_CORNER_RADIUS
|
private static int |
BIGGER_SCREEN_LONG_SIDE_RESOLUTION_DP
|
private static int |
BIGGER_SCREEN_SHORT_SIDE_RESOLUTION_DP
|
static java.lang.String |
EXTRA_BASE_DOMAIN_KEY
|
static java.lang.String |
EXTRA_COOKIESTRINGS_KEY
|
static java.lang.String |
EXTRA_INITIAL_CONTENT_KEY
|
static java.lang.String |
EXTRA_SHOULD_STAY_OPEN_KEY
|
private static int |
INTERSTITIAL_BORDER_BIGGER_DEVICE
|
private static int |
INTERSTITIAL_BORDER_SMALLER_DEVICE
|
private static int |
LONG_SIDE_SIZE_FOR_BIGGER_SCREEN_DP
|
private static int |
LONG_SIDE_SIZE_FOR_SMALLER_SCREEN_DP
|
private boolean |
mShouldStayOpen
|
private WebView |
mWebView
|
private LinearLayout |
mWebViewContainer
|
private static int |
SHORT_SIDE_SIZE_FOR_BIGGER_SCREEN_DP
|
private static int |
SHORT_SIDE_SIZE_FOR_SMALLER_SCREEN_DP
|
| Constructor Summary | |
|---|---|
InterstitialActivity()
|
|
| Method Summary | |
|---|---|
private int |
determineInterstitialBorderWidth()
|
private static Drawable |
generateBackgroundDrawable()
|
private ViewGroup.LayoutParams |
generateLayoutParamsForCurrentDisplay()
|
private boolean |
isCurrentOrientationPortrait()
Returns true if the current orientation of the device is portrait. |
private boolean |
isHostBiggerDevice()
Returns whether the host device has a display bigger than the thresholds defined by BIGGER_SCREEN_SHORT_SIDE_RESOLUTION_DP and
BIGGER_SCREEN_LONG_SIDE_RESOLUTION_DP |
void |
onConfigurationChanged(Configuration newConfig)
|
protected void |
onCreate(Bundle savedInstanceState)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int INTERSTITIAL_BORDER_SMALLER_DEVICE
private static final int INTERSTITIAL_BORDER_BIGGER_DEVICE
private static final int BACKGROUND_DRAWABLE_CORNER_RADIUS
private static final int BACKGROUND_DRAWABLE_ALPHA
public static final java.lang.String EXTRA_SHOULD_STAY_OPEN_KEY
public static final java.lang.String EXTRA_INITIAL_CONTENT_KEY
public static final java.lang.String EXTRA_BASE_DOMAIN_KEY
public static final java.lang.String EXTRA_COOKIESTRINGS_KEY
private static final int BIGGER_SCREEN_SHORT_SIDE_RESOLUTION_DP
private static final int BIGGER_SCREEN_LONG_SIDE_RESOLUTION_DP
private static final int SHORT_SIDE_SIZE_FOR_SMALLER_SCREEN_DP
private static final int LONG_SIDE_SIZE_FOR_SMALLER_SCREEN_DP
private static final int SHORT_SIDE_SIZE_FOR_BIGGER_SCREEN_DP
private static final int LONG_SIDE_SIZE_FOR_BIGGER_SCREEN_DP
private WebView mWebView
private boolean mShouldStayOpen
private LinearLayout mWebViewContainer
| Constructor Detail |
|---|
public InterstitialActivity()
| Method Detail |
|---|
protected void onCreate(Bundle savedInstanceState)
private static Drawable generateBackgroundDrawable()
private ViewGroup.LayoutParams generateLayoutParamsForCurrentDisplay()
private boolean isHostBiggerDevice()
BIGGER_SCREEN_SHORT_SIDE_RESOLUTION_DP and
BIGGER_SCREEN_LONG_SIDE_RESOLUTION_DP
private int determineInterstitialBorderWidth()
private boolean isCurrentOrientationPortrait()
Returns true if the current orientation of the device is portrait.
Implementation note: This implementation assumes that DisplayMetrics.heightPixels and DisplayMetrics.widthPixels get swapped when the orientation changes. This avoids using the deprecated Display.getOrientation() method as well as the getRotation() method which is available only from API 8 on.
public void onConfigurationChanged(Configuration newConfig)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||