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.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eNativeTemplateStyle\u003c/code\u003e defines the style options for native ad templates within the Google Mobile Ads API.\u003c/p\u003e\n"],["\u003cp\u003eIt includes attributes to customize the text styles of the call to action, primary, secondary, and tertiary text fields via \u003ccode\u003eNativeTemplateTextStyle\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMainBackgroundColor\u003c/code\u003e attribute allows setting the background color of the template, and \u003ccode\u003eTemplateId\u003c/code\u003e is used to identify which specific template to render.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructors available to instantiate this object: a default constructor, and one that takes another \u003ccode\u003eNativeTemplateStyle\u003c/code\u003e object.\u003c/p\u003e\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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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](/ad-manager/mobile-ads-sdk/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```"]]