FMX.Advertising.TCustomBannerAd.AdSize
Delphi
property AdSize: TBannerAdSize read FAdSize write FAdSize default TBannerAdSize.Auto;
C++
__property TBannerAdSize AdSize = {read=FAdSize, write=FAdSize, default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FMX.Advertising.pas FMX.Advertising.hpp |
FMX.Advertising | TCustomBannerAd |
Description
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.