Yerel Stiller
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Platform seçin:
Android
iOS
Flutter
Doğal stil ayarları, Google Ad Manager'ın yerel reklamlarınızın oluşturulmasını üründe belirttiğiniz doğal stillere göre yürütmesini sağlar. Öncelikle boyutu ve hedeflemeyi belirtin.
Ardından, duyarlı reklamlar tanımlamak ve tüm ekranlarda kaliteli bir görüntü elde etmek için HTML, CSS ve JavaScript ekleyin. Oluşturma işlemini sizin yapmanız gerekmez. Ad Manager, hedef için doğru yerel stili otomatik olarak uygular. Doğal reklam stilleri, banner reklamlar gibi AdManagerAdView
kullanılarak uygulanır. Önceden belirlenmiş sabit bir reklam boyutuyla veya çalışma zamanında belirlenen değişken bir reklam boyutuyla kullanılabilirler.
Ön koşullar
- Google Mobile Ads Flutter eklentisi 0.13.6 veya daha sonraki bir sürüm
Bu kılavuzda, Google Mobile Ads SDK'sı hakkında bilgi sahibi olduğunuz varsayılır.
Henüz yapmadıysanız Başlangıç kılavuzumuzu inceleyin.
Sabit boyut
Sabit boyutlu yerel stiller, yerel reklamın genişliğini ve yüksekliğini kontrol etmenize olanak tanır. Sabit bir boyut ayarlamak için aşağıdaki adımları uygulayın:
Ad Manager kullanıcı arayüzünde bir satır öğesi oluşturun ve Size
alanının açılır listesinden önceden tanımlanmış boyutlardan birini seçin.
1. adımda ayarladığınız boyutta bir AdManagerBannerAd
yükleyin.
Reklamın nasıl oluşturulacağı ve yükleneceği hakkında bilgi edinmek için Banner Reklam dokümanlarına bakın.
Boyutların ve bunlara karşılık gelen AdSize
sabitlerinin listesini Banner boyutu bölümünde görebilirsiniz.
Aşağıda, MEDIUM_RECTANGLE
(300x250) reklam boyutu gibi sabit bir boyutun nasıl belirtileceğine dair bir örnek verilmiştir:
AdManagerBannerAd ad = AdManagerBannerAd(
adUnitId: '<your-ad-unit>',
sizes: <AdSize>[AdSize.mediumRectangle],
request: AdManagerAdRequest(),
);
Değişken boyut
Bazı durumlarda sabit bir boyut mantıklı olmayabilir. Örneğin, reklamın genişliğinin uygulamanızın içeriğiyle eşleşmesini isteyebilirsiniz ancak yüksekliğinin reklamın içeriğine uyacak şekilde dinamik olarak ayarlanması gerekebilir. Bu durumu ele almak için Ad Manager kullanıcı arayüzünde reklam boyutu olarak Fluid
değerini belirtebilirsiniz. Bu değer, reklam boyutunun uygulamada çalışma zamanında belirlendiğini gösterir. SDK, bu durumu ele almak için özel bir AdSize
sabiti olan FLUID
sağlar.
Değişken reklam boyutu yüksekliği, yayıncı tarafından tanımlanan genişliğe göre dinamik olarak belirlenir. Bu sayede platform reklam görünümü, yüksekliğini reklam öğesinin yüksekliğiyle eşleşecek şekilde ayarlayabilir.
Değişken istek
Değişken boyutlu reklam istemek için FluidAdManagerBannerAd
kullanın:
final fluidAd = FluidAdManagerBannerAd(
adUnitId: '<your-ad-unit>',
request: AdManagerAdRequest(),
listener: AdManagerBannerAdListener(
onAdLoaded: (Ad ad) {
print('$_fluidAd loaded.');
},
onAdFailedToLoad: (Ad ad, LoadAdError error) {
print('$_fluidAd failedToLoad: $error');
ad.dispose();
},
),
Değişken reklamı görüntüleme
Reklamınız yüklendikten sonra esnek reklamları görüntülemek için FluidAdWidget
simgesini kullanın. Reklam, yüksekliğini temel alınan platform reklam görünümüne uyacak şekilde ayarlar:
FluidAdWidget(
width: <your-width>,
ad: fluidAd,
);
GitHub'daki örnek uygulamada Ad Manager değişken reklam boyutu için örnek bir uygulamayı inceleyin.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-09-06 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-09-06 UTC."],[[["\u003cp\u003eNative style settings in Google Ad Manager allow you to customize the look and feel of your native ads using HTML, CSS, and JavaScript for a seamless user experience.\u003c/p\u003e\n"],["\u003cp\u003eYou can define fixed-size native ads by specifying their dimensions in the Ad Manager UI and using corresponding \u003ccode\u003eAdSize\u003c/code\u003e constants when loading the ad in your app.\u003c/p\u003e\n"],["\u003cp\u003eAlternatively, fluid-size native ads dynamically adjust their height based on the width you provide, ensuring responsiveness across different screens using the \u003ccode\u003eFluidAdManagerBannerAd\u003c/code\u003e and \u003ccode\u003eFluidAdWidget\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo implement native ads, you need Google Mobile Ads Flutter Plugin version 0.13.6 or higher and basic familiarity with the Google Mobile Ads SDK.\u003c/p\u003e\n"]]],["Google Ad Manager renders native ads based on specified styles. Users define ad size and targeting, then add HTML, CSS, and JavaScript for responsive design. Fixed ad sizes are set in the Ad Manager UI and loaded using `AdManagerBannerAd` with corresponding `AdSize` constants. Fluid ads use `Fluid` in the UI and the `FLUID` constant, with `FluidAdManagerBannerAd` for requests and `FluidAdWidget` for display, dynamically adjusting the height.\n"],null,["Select platform: [Android](/ad-manager/mobile-ads-sdk/android/native/styles \"View this page for the Android platform docs.\") [iOS](/ad-manager/mobile-ads-sdk/ios/native/styles \"View this page for the iOS platform docs.\") [Flutter](/ad-manager/mobile-ads-sdk/flutter/native/styles \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\n[Native style settings](//support.google.com/admanager/answer/6366914)\nenable Google Ad Manager to handle the rendering of your native ads based on native\nstyles you specify within the product. First, specify size and targeting.\nThen add HTML, CSS, and JavaScript to define ads that are responsive\nand produce a quality display across all screens. You don't need to do\nany of the rendering; Ad Manager automatically applies the right native style\nfor the destination. Native styles are implemented just like banner ads,\nusing a `AdManagerAdView`. They can be used with a fixed ad\nsize determined ahead of time, or a fluid ad size determined at runtime.\n\nPrerequisites\n\n- Google Mobile Ads Flutter Plugin version 0.13.6 or higher\n\nThis guide assumes some working knowledge of the Google Mobile Ads SDK.\nIf you haven't already done so, consider running through our\n[Get Started](/ad-manager/mobile-ads-sdk/flutter/quick-start) guide.\n\nFixed size\n\nNative styles with a fixed size allow you to control the width and height\nof the native ad. To set a fixed size, follow these steps:\n\n1. Create a line item in the Ad Manager UI and select one of the\n predefined sizes from the `Size` field dropdown.\n\n2. Load an `AdManagerBannerAd` with the same size you set up in step 1.\n See the [Banner Ad](/ad-manager/mobile-ads-sdk/flutter/banner/get-started#instantiate_ad)\n documentation for how to instantiate and load an ad.\n You can see a list of sizes and their corresponding `AdSize` constants\n in the [Banner size](/ad-manager/mobile-ads-sdk/flutter/banner/get-started#banner_sizes)\n section.\n\nHere's an example of how to specify a fixed size, such as the\n`MEDIUM_RECTANGLE` (300x250) ad size: \n\n AdManagerBannerAd ad = AdManagerBannerAd(\n adUnitId: '\u003cyour-ad-unit\u003e',\n sizes: \u003cAdSize\u003e[AdSize.mediumRectangle],\n request: AdManagerAdRequest(),\n );\n\nFluid size\n\nIn some cases, a fixed size may not make sense. For example, you may\nwant the width of the ad to match your app's content, but need its height\nto dynamically adjust to fit the ad's content. To handle this case,\nyou can specify `Fluid` as the ad size in the Ad Manager UI, which\ndesignates that the size of the ad is determined at runtime in the app.\nThe SDK provides a special `AdSize` constant, `FLUID`, to handle this case.\nThe fluid ad size height is dynamically determined based on the publisher\ndefined width, allowing the platform ad view to adjust its height to match that\nof the creative.\n\nFluid request\n\nUse `FluidAdManagerBannerAd` to request a fluid ad: \n\n final fluidAd = FluidAdManagerBannerAd(\n adUnitId: '\u003cyour-ad-unit\u003e',\n request: AdManagerAdRequest(),\n listener: AdManagerBannerAdListener(\n onAdLoaded: (Ad ad) {\n print('$_fluidAd loaded.');\n },\n onAdFailedToLoad: (Ad ad, LoadAdError error) {\n print('$_fluidAd failedToLoad: $error');\n ad.dispose();\n },\n ),\n\nDisplaying the fluid ad\n\nAfter your ad is loaded, use `FluidAdWidget` to display fluid ads. It will\nadjust its height to match the underlying platform ad view: \n\n FluidAdWidget(\n width: \u003cyour-width\u003e,\n ad: fluidAd,\n );\n\nSee an example implementation of Ad Manager Fluid ad size in the example app\non [Github](https://github.com/googleads/googleads-mobile-flutter/blob/master/packages/google_mobile_ads/example/lib/fluid_example.dart)."]]