public class NativeAdViewAttributes
extends java.lang.Object
Usage:
NativeAdViewAttributes attributes = new NativeAdViewAttributes(mContext)
.setBackgroundColor(mAdBackgroundColor) .setTitleTextColor(mTitleColor)
.setDescriptionTextColor(mContentColor) .setButtonBorderColor(mCtaTextColor)
.setButtonTextColor(mCtaTextColor) .setButtonColor(mCtaBgColor);
View adView = NativeAdView.render(activity, mNativeAd, mViewType, attributes);
Constructor and Description |
---|
NativeAdViewAttributes()
Deprecated.
use
NativeAdViewAttributes(Context) instead. |
NativeAdViewAttributes(Context context)
Create NativeAdViewAttributes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAutoplay()
Deprecated.
|
boolean |
getAutoplayOnMobile()
Deprecated.
|
int |
getBackgroundColor()
Deprecated.
|
int |
getButtonBorderColor()
Deprecated.
|
int |
getButtonColor()
Deprecated.
|
int |
getButtonTextColor()
Deprecated.
|
int |
getDescriptionTextColor()
Deprecated.
|
int |
getDescriptionTextSize()
Deprecated.
|
com.facebook.ads.internal.api.NativeAdViewAttributesApi |
getInternalAttributes()
Used by other SDK classes and subject to change.
|
int |
getTitleTextColor()
Deprecated.
|
int |
getTitleTextSize()
Deprecated.
|
Typeface |
getTypeface()
Deprecated.
|
NativeAdViewAttributes |
setAutoplay(boolean autoplay)
Deprecated.
|
NativeAdViewAttributes |
setAutoplayOnMobile(boolean autoplay)
Deprecated.
|
NativeAdViewAttributes |
setBackgroundColor(int backgroundColor)
The color that will be used as background for the whole Ad View.
|
NativeAdViewAttributes |
setButtonBorderColor(int buttonBorderColor)
The color for the border of the CTA button.
|
NativeAdViewAttributes |
setButtonColor(int buttonColor)
The background color of the CTA button.
|
NativeAdViewAttributes |
setButtonTextColor(int buttonTextColor)
The text color of the CTA button.
|
NativeAdViewAttributes |
setDescriptionTextColor(int descriptionTextColor)
The color that will be used for all text fields except the title and the CTA button.
|
NativeAdViewAttributes |
setTitleTextColor(int titleTextColor)
The color that will be used for the Ad Title and AdOptionsView.
|
NativeAdViewAttributes |
setTypeface(Typeface typeface)
Sets the
Typeface for all text in the Ad View. |
public NativeAdViewAttributes(Context context)
@Deprecated public NativeAdViewAttributes()
NativeAdViewAttributes(Context)
instead.public com.facebook.ads.internal.api.NativeAdViewAttributesApi getInternalAttributes()
public NativeAdViewAttributes setTypeface(Typeface typeface)
Typeface
for all text in the Ad View.typeface
- The Typeface
to set.NativeAdViewAttributes
to continue setting parameters.public NativeAdViewAttributes setBackgroundColor(int backgroundColor)
backgroundColor
- The color to set.NativeAdViewAttributes
to continue setting parameters.public NativeAdViewAttributes setTitleTextColor(int titleTextColor)
titleTextColor
- The color to set.NativeAdViewAttributes
to continue setting parameters.public NativeAdViewAttributes setDescriptionTextColor(int descriptionTextColor)
descriptionTextColor
- The color to set.NativeAdViewAttributes
to continue setting parameters.public NativeAdViewAttributes setButtonColor(int buttonColor)
buttonColor
- The color to set.NativeAdViewAttributes
to continue setting parameters.public NativeAdViewAttributes setButtonTextColor(int buttonTextColor)
buttonTextColor
- The color to set.NativeAdViewAttributes
to continue setting parameters.public NativeAdViewAttributes setButtonBorderColor(int buttonBorderColor)
buttonBorderColor
- NativeAdViewAttributes
to continue setting parameters.@Deprecated public NativeAdViewAttributes setAutoplayOnMobile(boolean autoplay)
@Deprecated public NativeAdViewAttributes setAutoplay(boolean autoplay)
@Deprecated public boolean getAutoplay()
@Deprecated public boolean getAutoplayOnMobile()
@Deprecated public Typeface getTypeface()
@Deprecated public int getBackgroundColor()
@Deprecated public int getTitleTextColor()
@Deprecated public int getDescriptionTextColor()
@Deprecated public int getButtonColor()
@Deprecated public int getButtonTextColor()
@Deprecated public int getButtonBorderColor()
@Deprecated public int getTitleTextSize()
@Deprecated public int getDescriptionTextSize()