AdSize

actual class AdSize(val width: Int, val height: Int)
expect class AdSize(width: Int, height: Int)

Based on the AdMob implementation of AdSize, this module enables Android-like syntax to be used multiplatform.

Parameters

width

The width of the ad in density-independent pixels (dp).

height

The height of the ad in density-independent pixels (dp).

See also

A dynamic ad size that matches the width of the screen.

A dynamic ad size that matches the height of the screen.

A 320x50 banner ad.

A 468x60 full banner ad.

A 320x100 large banner ad.

A 728x90 leaderboard ad.

A 300x250 medium rectangle ad.

A 160x600 wide skyscraper ad.

A dynamically sized ad that matches its parent's width and dynamically sets its height to match the ad creative.

An invalid ad size.

actual class AdSize(val width: Int, val height: Int)

Constructors

Link copied to clipboard
actual constructor(width: Int, height: Int)
expect constructor(width: Int, height: Int)
actual constructor(width: Int, height: Int)

Types

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion

Properties

Link copied to clipboard
actual val height: Int
expect val height: Int

The height of the ad in whatever unit of measurement Google came up with

actual val height: Int
Link copied to clipboard
actual val width: Int
expect val width: Int

The width of the ad in whatever unit of measurement Google came up with

actual val width: Int

Functions

Link copied to clipboard
fun AdSize.toAndroid(): AdSize
Link copied to clipboard
Link copied to clipboard
fun toIos(): GADAdSize