|
@@ -87,6 +87,10 @@ class AdmobNativeAdManager(private val context: Context) : NativeAdManager {
|
|
|
|
|
|
private fun buildAdView(ad: UnifiedNativeAd, nativeAdViewBinder: NativeAdViewBinder): View {
|
|
private fun buildAdView(ad: UnifiedNativeAd, nativeAdViewBinder: NativeAdViewBinder): View {
|
|
return (LayoutInflater.from(context).inflate(nativeAdViewBinder.layout, null) as UnifiedNativeAdView).apply {
|
|
return (LayoutInflater.from(context).inflate(nativeAdViewBinder.layout, null) as UnifiedNativeAdView).apply {
|
|
|
|
+ /**
|
|
|
|
+ * Only the ad titles, URLs, CTA, and non-background image assets should be clickable.
|
|
|
|
+ * https://support.google.com/admob/answer/6240814?hl=en&ref_topic=2745287
|
|
|
|
+ * */
|
|
findViewById<MediaView>(nativeAdViewBinder.mainImageViewId)?.let {
|
|
findViewById<MediaView>(nativeAdViewBinder.mainImageViewId)?.let {
|
|
mediaView = it
|
|
mediaView = it
|
|
}
|
|
}
|
|
@@ -100,7 +104,6 @@ class AdmobNativeAdManager(private val context: Context) : NativeAdManager {
|
|
}
|
|
}
|
|
findViewById<TextView>(nativeAdViewBinder.textTextViewId)?.let {
|
|
findViewById<TextView>(nativeAdViewBinder.textTextViewId)?.let {
|
|
ad.body?.apply { it.text = this }
|
|
ad.body?.apply { it.text = this }
|
|
- bodyView = it
|
|
|
|
}
|
|
}
|
|
findViewById<Button>(nativeAdViewBinder.ctaButtonId)?.let {
|
|
findViewById<Button>(nativeAdViewBinder.ctaButtonId)?.let {
|
|
ad.callToAction?.apply { it.text = this }
|
|
ad.callToAction?.apply { it.text = this }
|