FMX.Advertising.TBannerAd.AdSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AdSize: TBannerAdSize read FAdSize write FAdSize default 0;

C++

__property AdSize = {default=0};

Properties

Type Visibility Source Unit Parent
property published
FMX.Advertising.pas
FMX.Advertising.hpp
FMX.Advertising TBannerAd

Description

For Android applications, allows you to specify the size of the banner ad you want to be displayed.

FMX.Advertising.TBannerAd.AdSize inherits from FMX.Advertising.TCustomBannerAd.AdSize. All content below this line refers to FMX.Advertising.TCustomBannerAd.AdSize.

For Android applications, allows you to specify the size of the banner ad you want to be displayed. If the screen does not have adequate resolution to display the fixed-size ad you specify, then no advertisement appears.

For iOS apps, the setting of AdSize is always ignored. The iAd framework always automatically determines the best size ad for the device.

The settings for AdSize are as follows:

  • Auto: AdMob SmartBanner; the most appropriate size ad will be selected for the device.
    • Some devices might not be compatible with this setting. For these devices, using a fixed-size ad is recommended.
    • For more information, see Smart Banner in the Google Mobile Ad SDK Documentation.
  • Small: AdMob Banner size, 320 x 50 px.
  • Medium: AdMob Full Banner size, 468 x 60 px.
  • Large: AdMob Leaderboard size, 728 x 90 px.

The TBannerAd component automatically resizes itself to fit the size of the advertisement.

To manually set the size of the component at run time, you can implement an event handler for the FMX.Advertising.TBannerAd.OnResize event.

See Also