Stay organized with collections
Save and categorize content based on your preferences.
GoogleMobileAds.Api.NativeTemplateStyle
Style options for native templates.
Summary
Public attributes
MainBackgroundColor
Color MainBackgroundColor
TemplateId
string TemplateId
An identifier representing the native template to render.
Public functions
NativeTemplateStyle
NativeTemplateStyle()
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-08-20 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-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGoogleMobileAds.Api.NativeTemplateStyle\u003c/code\u003e provides style options for customizing the appearance of native ad templates.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties for controlling text styles (like \u003ccode\u003ePrimaryText\u003c/code\u003e, \u003ccode\u003eSecondaryText\u003c/code\u003e, \u003ccode\u003eTertiaryText\u003c/code\u003e, and \u003ccode\u003eCallToActionText\u003c/code\u003e), background color (\u003ccode\u003eMainBackgroundColor\u003c/code\u003e), and the template identifier (\u003ccode\u003eTemplateId\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this class to define how different elements of a native template should look, ensuring the ads blend seamlessly with their app's design.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers constructors for creating new styles and copying existing ones, along with public attributes to access and modify style properties.\u003c/p\u003e\n"]]],["The `NativeTemplateStyle` provides options for customizing native ad templates. Key attributes include `CallToActionText`, `PrimaryText`, `SecondaryText`, and `TertiaryText`, allowing for `NativeTemplateTextStyle` adjustments. `MainBackgroundColor` sets the background color, and `TemplateId` specifies the template to use. Two constructors, a default and one taking a `NativeTemplateStyle`, are available to initialize this object.\n"],null,["# GoogleMobileAds.Api.NativeTemplateStyle Class Reference\n\nGoogleMobileAds.Api.NativeTemplateStyle\n=======================================\n\nStyle options for native templates.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [NativeTemplateStyle](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1a509cfcdb7663a1d4c90bac69eeb031cf)`()` ||\n| [NativeTemplateStyle](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1a82a7bc9197c4da293b0f8fd431aec394)`(`[NativeTemplateStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-style#class_google_mobile_ads_1_1_api_1_1_native_template_style)` templateStyle)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CallToActionText](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1a713fff251bc18831f3c9819b51966166) | [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) The [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) for the call to action. |\n| [MainBackgroundColor](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1ae7daf095f0a3321c55dbe2e5fa63f47e) | `Color` |\n| [PrimaryText](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1a957ff96db5d2b85d290853628d812a13) | [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) |\n| [SecondaryText](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1aa84b00f0eb277d232b602b8541c9862a) | [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) The [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) for the second row of text in the template. |\n| [TemplateId](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1adb2ef6c64acf3388a18cbad41b088746) | `string` An identifier representing the native template to render. |\n| [TertiaryText](#class_google_mobile_ads_1_1_api_1_1_native_template_style_1a0661e15163916608a9165b3667dfff59) | [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) The [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) for the third row of text in the template. |\n\nPublic attributes\n-----------------\n\n### CallToActionText\n\n```c#\nNativeTemplateTextStyle CallToActionText\n``` \nThe [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) for the call to action. \n\n### MainBackgroundColor\n\n```c#\nColor MainBackgroundColor\n``` \n\n### PrimaryText\n\n```c#\nNativeTemplateTextStyle PrimaryText\n``` \n\n### SecondaryText\n\n```c#\nNativeTemplateTextStyle SecondaryText\n``` \nThe [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) for the second row of text in the template. \n\n### TemplateId\n\n```c#\nstring TemplateId\n``` \nAn identifier representing the native template to render. \n\n### TertiaryText\n\n```c#\nNativeTemplateTextStyle TertiaryText\n``` \nThe [NativeTemplateTextStyle](/admob/unity/reference/class/google-mobile-ads/api/native-template-text-style#class_google_mobile_ads_1_1_api_1_1_native_template_text_style) for the third row of text in the template.\n\nPublic functions\n----------------\n\n### NativeTemplateStyle\n\n```c#\n NativeTemplateStyle()\n``` \n\n### NativeTemplateStyle\n\n```c#\n NativeTemplateStyle(\n NativeTemplateStyle templateStyle\n)\n```"]]