Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Api.NativeAdOptions
Ad options for configuring the view of native ads.
Summary
Public attributes
AdChoicesPlacement
AdChoicesPlacement AdChoicesPlacement
Sets the placement of AdChoices icon (if present).
Default is TopRightCorner.
MediaAspectRatio MediaAspectRatio
Image and video aspect ratios.
Default is Unknown.
Public functions
NativeAdOptions
NativeAdOptions()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-07 UTC."],[[["`NativeAdOptions` configures the display settings for native ads within the Google Mobile Ads SDK."],["You can create a `NativeAdOptions` object using the default constructor or by copying an existing `NativeAdOptions` object."],["The `AdChoicesPlacement` attribute allows you to set the position of the AdChoices icon, defaulting to the top right corner."],["`MediaAspectRatio` determines the aspect ratio of images and videos in native ads and defaults to an unknown ratio."],["`VideoOptions` enables the setting of a `VideoOptions` object to control video playback in native ads."]]],["`NativeAdOptions` configures native ad views, offering control over presentation. Key actions include creating `NativeAdOptions` objects, either default or new. Attributes manage ad display aspects: `AdChoicesPlacement` sets the AdChoices icon's position, with a default of TopRightCorner; `MediaAspectRatio` defines image and video ratios, defaulting to Unknown; and `VideoOptions` handles video playback. These elements enable customization of how native ads are rendered.\n"]]