سازنده‌ی NativeAdOptions

public final class NativeAdOptions.Builder


کلاس سازنده برای NativeAdOptions .

خلاصه

سازندگان عمومی

Builder ()

روش‌های عمومی

NativeAdOptions
build ()

Constructs a NativeAdOptions object with the specified attributes.

NativeAdOptions.Builder

کشیدن انگشت روی صفحه را به عنوان یک حرکت کلیک سفارشی فعال می‌کند.

NativeAdOptions.Builder

Sets the placement of AdChoices icon (if present).

NativeAdOptions.Builder

نسبت ابعاد رسانه را تنظیم می‌کند.

NativeAdOptions.Builder
@ CanIgnoreReturnValue
setRequestCustomMuteThisAd (boolean requestCustomMuteThisAd)

Set this boolean to true to request a custom implementation for the Mute This Ad feature.

NativeAdOptions.Builder
@ CanIgnoreReturnValue
setRequestMultipleImages (boolean shouldRequestMultipleImages)

تعیین می‌کند که آیا چندین تصویر باید درخواست شوند یا خیر.

NativeAdOptions.Builder

تعیین می‌کند که آیا فقط URLها باید برای تصاویر برگردانده شوند یا خیر.

NativeAdOptions.Builder

شیء VideoOptions را تنظیم می‌کند.

سازندگان عمومی

سازنده

public Builder()

روش‌های عمومی

ساختن

public NativeAdOptions build()

یک شیء NativeAdOptions با ویژگی‌های مشخص شده می‌سازد.

enableCustomClickGestureDirection

@CanIgnoreReturnValue
public NativeAdOptions.Builder enableCustomClickGestureDirection(
    @NativeAdOptions.SwipeGestureDirection int swipeGestureDirection,
    boolean tapsAllowed
)

کشیدن انگشت روی صفحه را به عنوان یک حرکت کلیک سفارشی فعال می‌کند.

پارامترها
@ NativeAdOptions.SwipeGestureDirection int swipeGestureDirection

The SwipeGestureDirection to be counted as a click.

boolean tapsAllowed

اینکه آیا هنوز هم باید ضربه‌ها به عنوان کلیک مجاز باشند یا خیر.

فقط برای ناشران مجاز موجود است. این تنظیمات برای ناشرانی که مجاز نیستند، نادیده گرفته می‌شود.

تنظیم جایگاه تبلیغات

@CanIgnoreReturnValue
public NativeAdOptions.Builder setAdChoicesPlacement(
    @NativeAdOptions.AdChoicesPlacement int adChoicesPlacement
)

Sets the placement of AdChoices icon (if present). The value should be one of ADCHOICES_TOP_LEFT, ADCHOICES_TOP_RIGHT, ADCHOICES_BOTTOM_RIGHT or ADCHOICES_BOTTOM_LEFT. The default value is ADCHOICES_TOP_RIGHT.

نسبت ابعاد رسانه‌ای تنظیم‌شده

@CanIgnoreReturnValue
public NativeAdOptions.Builder setMediaAspectRatio(
    @NativeAdOptions.NativeMediaAspectRatio int aspectRatio
)

نسبت ابعاد رسانه را تنظیم می‌کند.

پارامترها
@ NativeAdOptions.NativeMediaAspectRatio int aspectRatio

aspect ratio to be set using one of NativeMediaAspectRatio options.

setRequestCustomMuteThisAd

@CanIgnoreReturnValue
public NativeAdOptions.Builder setRequestCustomMuteThisAd(boolean requestCustomMuteThisAd)

برای درخواست پیاده‌سازی سفارشی برای ویژگی بی‌صدا کردن این تبلیغ، این مقدار بولی را روی true تنظیم کنید. مقدار پیش‌فرض false است.

setRequestMultipleImages

@CanIgnoreReturnValue
public NativeAdOptions.Builder setRequestMultipleImages(boolean shouldRequestMultipleImages)

Sets whether multiple images should be requested or not. Default value is false.

setReturnUrlsForImageAssets

@CanIgnoreReturnValue
public NativeAdOptions.Builder setReturnUrlsForImageAssets(boolean shouldReturnUrls)

Sets whether URLs alone should be returned for image assets. If true, the SDK will not download image assets and instead return a NativeAd.Image with just the URI and Scale properties populated. If false, the SDK will automatically download image assets and return a NativeAd.Image with all three properties (URI, Scale, and Drawable) populated. The default value is false.

تنظیمات ویدیو

@CanIgnoreReturnValue
public NativeAdOptions.Builder setVideoOptions(VideoOptions videoOptions)

شیء VideoOptions را تنظیم می‌کند.