public class MadvertiseView
extends FrameLayout
| Modifier and Type | Class and Description |
|---|---|
static interface |
MadvertiseView.AnimationEndListener
Listener to be informed when animations on a view end
|
static interface |
MadvertiseView.MadvertiseViewCallbackListener
Interface to receive diverse callbacks
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GENDER_FEMALE
The gender-type of female users
|
static java.lang.String |
GENDER_MALE
The gender-type of male users
|
static int |
MAKE_VISIBLE |
| Constructor and Description |
|---|
MadvertiseView(Context context)
Constructor
|
MadvertiseView(Context context,
AttributeSet attrs)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBannerType()
Gets the current banner type.
|
protected void |
onAttachedToWindow() |
protected void |
onDetachedFromWindow() |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
boolean |
onTouchEvent(MotionEvent event) |
void |
onWindowFocusChanged(boolean hasWindowFocus) |
void |
removeMadViewCallbackListener()
Removes the current listener that receives notifications about the ad
loading process
|
static void |
setAge(java.lang.String age)
Set the age or age range of your app's user.
|
void |
setBannerType(java.lang.String bannerType)
Sets the banner type.
|
void |
setFetchingAdsEnabled(boolean isEnabled)
Enable/disable the loading of new ads.
|
static void |
setGender(java.lang.String gender)
Set the gender of your app's user.
|
void |
setMadvertiseViewCallbackListener(MadvertiseView.MadvertiseViewCallbackListener listener)
Sets a listener that receives notifications about the ad loading process
|
void |
setPlacementType(int placementType)
Sets the placement type of a rich media ad.
|
void |
setVisibility(int visibility)
Set the visibility state of this view.
|
void |
stopRequestThread() |
public static final int MAKE_VISIBLE
public static final java.lang.String GENDER_MALE
public static final java.lang.String GENDER_FEMALE
public MadvertiseView(Context context)
context - public MadvertiseView(Context context,
AttributeSet attrs)
context - attrs - public boolean onTouchEvent(MotionEvent event)
public void setVisibility(int visibility)
visibility - - set the visibility with VISIBLE,
INVISIBLE or GONE.public void onWindowFocusChanged(boolean hasWindowFocus)
protected void onAttachedToWindow()
protected void onDetachedFromWindow()
public void stopRequestThread()
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
public void setPlacementType(int placementType)
placementType - the placement type, either
MadvertiseUtil.PLACEMENT_TYPE_INTERSTITIAL or
MadvertiseUtil.PLACEMENT_TYPE_INLINE.public java.lang.String getBannerType()
MadvertiseUtil constants for valid valuespublic void setBannerType(java.lang.String bannerType)
bannerType - See MadvertiseUtil constants for valid valuespublic static void setGender(java.lang.String gender)
gender - The gender, either GENDER_MALE or
GENDER_FEMALEpublic static void setAge(java.lang.String age)
age - The age, e.g. '26' or '20-30'public void setFetchingAdsEnabled(boolean isEnabled)
isEnabled - public void removeMadViewCallbackListener()
public void setMadvertiseViewCallbackListener(MadvertiseView.MadvertiseViewCallbackListener listener)
listener -