แบนเนอร์อัจฉริยะ
แบนเนอร์อัจฉริยะคือหน่วยโฆษณาที่แสดงผลโฆษณาแบนเนอร์ขนาดเต็มหน้าจอบนหน้าจอทุกขนาดในอุปกรณ์ต่างๆ ไม่ว่าจะวางแนวนอนหรือแนวตั้ง แบนเนอร์อัจฉริยะจะตรวจหาความกว้างของอุปกรณ์ในแนวการวางแนวปัจจุบันและสร้างการแสดงโฆษณาขนาดดังกล่าว
ระบบจะใช้โฆษณาที่มีความสูง 3 แบบในแบนเนอร์อัจฉริยะ ดังนี้
ความสูงของโฆษณา |
ความสูงของหน้าจอ |
32 dp |
≤ 400 dp |
50 dp |
มากกว่า 400 dp และไม่เกิน 720 dp |
90 dp |
มากกว่า 720 dp |
โดยปกติแล้ว แบนเนอร์อัจฉริยะในโทรศัพท์จะมีขนาดความสูง 50 dp ในแนวตั้งและ 32 dp ในแนวนอน บนแท็บเล็ต ความสูงปกติคือ 90 dp ทั้งแบบแนวตั้งและแนวนอน
เมื่อโฆษณาแบบรูปภาพมีขนาดเล็กเกินกว่าที่จะใช้พื้นที่ทั้งหมดที่จัดสรรไว้ รูปภาพจะไม่อยู่กึ่งกลางและระบบจะเติมพื้นที่ด้านข้าง

หากต้องการใช้แบนเนอร์อัจฉริยะ ให้ระบุ AdSize.SmartBanner
สำหรับขนาดโฆษณาเมื่อสร้าง BannerView
เช่น
// Create a Smart Banner at the top of the screen.
BannerView bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top);
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-02-20 UTC
[null,null,["อัปเดตล่าสุด 2025-02-20 UTC"],[[["Smart Banners are responsive ad units that adjust their size to fit the screen width of various devices and orientations."],["They utilize three ad heights (32 dp, 50 dp, 90 dp) based on the screen height of the device."],["Developers should use `AdSize.SmartBanner` when creating a `BannerView` to implement Smart Banners in their apps."],["Consider using adaptive banners as a newer alternative to Smart Banners for improved ad performance and flexibility."]]],["Smart Banners render screen-width ads, adapting to any device size and orientation. They detect device width and create an ad view accordingly, using heights of 32 dp (≤ 400 dp screen height), 50 dp (\u003e 400 dp and ≤ 720 dp), or 90 dp (\u003e 720 dp). Image ads are centered when they don't fill the space. To implement, specify `AdSize.SmartBanner` when creating a `BannerView`, such as `new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top)`.\n"]]