MediationUtils

public class MediationUtils


中介服務轉接器的實用方法。

摘要

常數

static final double
static final double

公用建構函式

公用方法

static @Nullable AdSize
findClosestSize(
    Context context,
    AdSize original,
    List<AdSize> potentials
)

從可用大小清單中找出與指定大小最接近的支援 AdSize。

常數

MIN_HEIGHT_RATIO

protected static final double MIN_HEIGHT_RATIO = 0.7

MIN_WIDTH_RATIO

protected static final double MIN_WIDTH_RATIO = 0.5

公用建構函式

MediationUtils

public MediationUtils()

公用方法

findClosestSize

public static @Nullable AdSize findClosestSize(
    Context context,
    AdSize original,
    List<AdSize> potentials
)

從支援的廣告尺寸清單中,找出與指定尺寸最接近的廣告尺寸。如果沒有任何項目位於指定的閾值大小範圍內,則會傳回空值。