スマートバナーてなくなるんですね!

全幅表示のバナーを引き続き使用したい場合は、以下のコード スニペットに示されるようにアダプティブ バナーを使用してください。
👉 SDK v20 の準備 | Android | Google Developers 
サンプルコードのここら。
// Determine the screen width (less decorations) to use for the ad width.
// If the ad hasn't been laid out, default to the full screen width.
private val adSize: AdSize
get() {
val display = windowManager.defaultDisplay
val outMetrics = DisplayMetrics()
display.getMetrics(outMetrics)
val density = outMetrics.density
var adWidthPixels = ad_view_container.width.toFloat()
if (adWidthPixels == 0f) {
adWidthPixels = outMetrics.widthPixels.toFloat()
}
val adWidth = (adWidthPixels / density).toInt()
return AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(this, adWidth)
}
👉 アダプティブ バナー | Google Developers 
コメントにも書かれてるけど、ほぼ無意味な
var adWidthPixels = ad_view_container.width.toFloat()
if (adWidthPixels == 0f) {
adWidthPixels = outMetrics.widthPixels.toFloat()
}
通常の利用するタイミングを考えるとほぼ常に「0f」 でしょうか。
他の公式サンプルを見てみます。
// Since we're loading the banner based on the adContainerView size, we need to wait until this
// view is laid out before we can get the width.
ad_view_container.viewTreeObserver.addOnGlobalLayoutListener {
if (!initialLayoutComplete) {
initialLayoutComplete = true
loadBanner()
}
}
👉 googleads-mobile-android-examples/MyActivity.kt 
ad_view_container のレイアウトが完了するまで待ってから、loadBanner() → ad_view_container.width と処理が進んで前述分岐の意味が発生。
、、、
うん、
やっぱ、最近の公式サンプルコードやべーわ!
View サイズの取得のタイミングについては以下で🙆
👉 java - View's getWidth() and getHeight() returns 0 - Stack Overflow 