-
public final class NativeAdSettingsUnified configuration parameters for all native ad view types. View type is automatically determined based on parameters:
Custom view: If contentView is provided
Vertical layout: If adType is NativeAdStyle.Vertical
Horizontal layout: If adType is NativeAdStyle.Horizontal
-
-
Field Summary
Fields Modifier and Type Field Description private final NativeAdStyleadTypeprivate final Integerwidthprivate final Integerheightprivate final StringadLabelTextprivate final IntegeradLabelAlignmentprivate final NativeAdCustomStylecustomStyleprivate final ViewcustomCtaViewprivate final ViewcustomBadgeViewprivate final ViewcontentViewprivate final AttributeSetattributeSetprivate final ErrorCallbackerrorCallback
-
Constructor Summary
Constructors Constructor Description NativeAdSettings(NativeAdStyle adType, Integer width, Integer height, String adLabelText, Integer adLabelAlignment, NativeAdCustomStyle customStyle, View customCtaView, View customBadgeView, View contentView, AttributeSet attributeSet, ErrorCallback errorCallback)
-
Method Summary
Modifier and Type Method Description final NativeAdStylegetAdType()final IntegergetWidth()final IntegergetHeight()final StringgetAdLabelText()final IntegergetAdLabelAlignment()final NativeAdCustomStylegetCustomStyle()final ViewgetCustomCtaView()final ViewgetCustomBadgeView()final ViewgetContentView()final AttributeSetgetAttributeSet()final ErrorCallbackgetErrorCallback()-
-
Constructor Detail
-
NativeAdSettings
NativeAdSettings(NativeAdStyle adType, Integer width, Integer height, String adLabelText, Integer adLabelAlignment, NativeAdCustomStyle customStyle, View customCtaView, View customBadgeView, View contentView, AttributeSet attributeSet, ErrorCallback errorCallback)
- Parameters:
adType- Type of native ad size/density (Vertical or Horizontal - required for layout-based ads)width- Width of native ad view in pixels (required for vertical and horizontal layouts)height- Optional height of native ad view in pixelsadLabelText- Optional text for ad labeladLabelAlignment- Optional alignment for ad labelcustomStyle- Optional custom styling for the native adcustomCtaView- Optional custom CTA button viewcustomBadgeView- Optional custom badge viewcontentView- Optional custom content view (if provided, creates CUSTOM type)attributeSet- Optional attribute set for view stylingerrorCallback- Optional callback for error handling
-
-
Method Detail
-
getAdType
final NativeAdStyle getAdType()
-
getAdLabelText
final String getAdLabelText()
-
getAdLabelAlignment
final Integer getAdLabelAlignment()
-
getCustomStyle
final NativeAdCustomStyle getCustomStyle()
-
getCustomCtaView
final View getCustomCtaView()
-
getCustomBadgeView
final View getCustomBadgeView()
-
getContentView
final View getContentView()
-
getAttributeSet
final AttributeSet getAttributeSet()
-
getErrorCallback
final ErrorCallback getErrorCallback()
-
-
-
-