Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions dynamicprice/nextgen/sdk/src/androidMain/kotlin/DynamicPrice.kt
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
package com.adsbynimbus.dynamicprice.nextgen

import android.app.Activity
import android.app.Activity.OVERRIDE_TRANSITION_CLOSE
import android.os.Build
import android.view.View
import android.view.ViewGroup
import android.webkit.WebView
import androidx.annotation.WorkerThread
import androidx.core.os.BundleCompat.getSerializable
import androidx.core.view.allViews
import androidx.core.view.*
import com.adsbynimbus.NimbusAd
import com.adsbynimbus.NimbusError
import com.adsbynimbus.dynamicprice.nextgen.internal.DynamicPriceRenderer
import com.adsbynimbus.dynamicprice.nextgen.internal.renderInline
import com.adsbynimbus.dynamicprice.nextgen.internal.webViewParent
import com.adsbynimbus.dynamicprice.nextgen.internal.*
import com.adsbynimbus.internal.Platform
import com.adsbynimbus.lineitem.Mapping
import com.adsbynimbus.lineitem.targetingMap
import com.adsbynimbus.lineitem.*
import com.adsbynimbus.render.*
import com.adsbynimbus.render.Renderer.Companion.loadBlockingAd
import com.adsbynimbus.request.NimbusResponse
Expand Down Expand Up @@ -50,7 +40,17 @@ public fun BannerAd.handleEventForNimbus(
activity: Activity? = Platform.currentActivity.get(),
) {
if (name == "na_render") DynamicPriceRenderer.render(this, data, listener) { nimbusAd ->
nimbusAd.renderInline(getView(activity!!).webViewParent)
getView(activity!!).webViewParent.let {
nimbusAd.renderInline(it).apply {
if (nimbusAd.type() != "video") return@apply
it.getChildAt(0)?.doOnLayout { webView ->
view?.updateLayoutParams {
height = webView.height
width = webView.width
}
}
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
ads-amazon = "11.1.0"
ads-google = "24.6.0"
ads-google-nextgen = "0.20.0-beta01"
ads-google-nextgen = "0.21.0-beta01"
ads-nimbus = "2.34.0"

android = "8.12.3"
Expand Down
Loading