إعلانات البانر الذكية
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
اختيار النظام الأساسي:
Android
iOS
Unity
إعلانات البانر الذكية هي وحدات إعلانية تعرض إعلانات بانر بعرض الشاشة على أي حجم شاشة على جميع الأجهزة في أي اتجاه. ترصد "إعلانات البانر الذكية" عرض الجهاز في اتجاهه الحالي وتنشئ عرض الإعلان بهذا الحجم.
يتم استخدام ثلاثة مقاييس طول للإعلانات في "إعلانات البانر الذكية":
ارتفاع الإعلان |
ارتفاع الشاشة |
32 وحدة بكسل مستقلة الكثافة |
≤ 400 وحدة بكسل مستقلة الكثافة |
50 وحدة بكسل مستقلة الكثافة |
> 400 وحدة بكسل مستقلة الكثافة و≤ 720 وحدة بكسل مستقلة الكثافة |
90 وحدة بكسل مستقلة الكثافة |
أكبر من 720 وحدة بكسل مستقلة الكثافة |
يبلغ ارتفاع "البانرات الذكية" عادةً 50 بكسل مستقل الكثافة في الوضع العمودي و32 بكسل مستقل الكثافة في الوضع الأفقي على الهواتف. على الأجهزة اللوحية، يبلغ الارتفاع عادةً 90 وحدة بكسل مستقلة عن الكثافة في كلا الاتجاهين.
عندما لا يكون الإعلان المصوّر كبيرًا بما يكفي لشغل المساحة المخصّصة بالكامل، سيتم توسيط الصورة وملء المساحة على كلا الجانبين.

لاستخدام "إعلانات البانر الذكية" في XML، حدِّد الثابت SMART_BANNER
لحجم الإعلان واضبط عرض AdView
على match_parent
. على سبيل المثال:
<com.google.android.gms.ads.admanager.AdManagerAdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
</com.google.android.gms.ads.admanager.AdManagerAdView>
لإنشاء "بانر ذكي" آليًا، استخدِم AdSize.SMART_BANNER
كحجم الإعلان:
Java
AdManagerAdView adView = new AdManagerAdView(this);
adView.setAdSizes(AdSize.SMART_BANNER);
Kotlin
val adView = AdManagerAdView(this)
adView.adSizes = AdSize.SMART_BANNER
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eSmart Banners are responsive ad units that automatically adjust their size to fit the width of the device screen.\u003c/p\u003e\n"],["\u003cp\u003eSmart Banners have three possible ad heights (32dp, 50dp, 90dp) depending on the screen height of the device.\u003c/p\u003e\n"],["\u003cp\u003eWhen using Smart Banners, specify \u003ccode\u003eSMART_BANNER\u003c/code\u003e as the \u003ccode\u003eadSize\u003c/code\u003e and set the \u003ccode\u003eAdView\u003c/code\u003e width to \u003ccode\u003ematch_parent\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eConsider using newer adaptive banners instead of Smart Banners for enhanced functionality.\u003c/p\u003e\n"]]],["Smart Banners display screen-width ads, adapting to device size and orientation. They use three ad heights: 32 dp (≤ 400 dp screen height), 50 dp (\u003e 400 dp and ≤ 720 dp), and 90 dp (\u003e 720 dp). To implement in XML, set `adSize` to `SMART_BANNER` and `AdView` width to `match_parent`. Programmatically, utilize `AdSize.SMART_BANNER`. Image ads are centered when smaller than the space. The content suggests using adaptive banners instead.\n"],null,["Select platform: [Android](/ad-manager/mobile-ads-sdk/android/banner/smart \"View this page for the Android platform docs.\") [iOS](/ad-manager/mobile-ads-sdk/ios/banner/smart \"View this page for the iOS platform docs.\") [Unity](/ad-manager/mobile-ads-sdk/unity/banner/smart \"View this page for the Unity platform docs.\")\n\n\u003cbr /\u003e\n\n| Try the newer [adaptive banners](/ad-manager/mobile-ads-sdk/android/banner/anchored-adaptive) instead.\n\nSmart Banners are ad units that render screen-width banner ads on any screen\nsize across different devices in either orientation. Smart Banners detect the\nwidth of the device in its current orientation and create the ad view that size.\n\nThree ad heights are implemented in smart banners:\n\n| Ad height | Screen height |\n|-----------|------------------------|\n| 32 dp | ≤ 400 dp |\n| 50 dp | \\\u003e 400 dp and ≤ 720 dp |\n| 90 dp | \\\u003e 720 dp |\n\nTypically, Smart Banners on phones have a height of 50 dp in portrait and 32 dp\nin landscape. On tablets, height is normally 90 dp in both orientations.\n\nWhen an image ad isn't large enough to take up the entire allotted space, the\nimage will be centered, and the space on either side will be filled in.\n\nTo use Smart Banners in XML, specify the constant `SMART_BANNER` for the ad\nsize and set the width of the `AdView` to `match_parent`. For example: \n\n```scdoc\n\u003ccom.google.android.gms.ads.admanager.AdManagerAdView\n xmlns:ads=\"http://schemas.android.com/apk/res-auto\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n ads:adSize=\"SMART_BANNER\"\n ads:adUnitId=\"ca-app-pub-3940256099942544/6300978111\"\u003e\n\u003c/com.google.android.gms.ads.admanager.AdManagerAdView\u003e\n```\n\nTo create a Smart Banner programmatically, use `AdSize.SMART_BANNER` as the ad\nsize: \n\nJava \n\n```java\nAdManagerAdView adView = new AdManagerAdView(this);\nadView.setAdSizes(AdSize.SMART_BANNER);\n```\n\nKotlin \n\n```kotlin\nval adView = AdManagerAdView(this)\nadView.adSizes = AdSize.SMART_BANNER\n```"]]