kotlin - Call function inside Android WebViewClient Jetpack compose - Stack Overflow

admin2025-03-19  2

I'm working with Kotlin and Jetpack Compose. My Code

AndroidView(factory = {
            WebView(it).apply {
                webViewClient = WebViewClient()
                Log.d("myTag", mUrl); //is called once    
            }
        }, update = {
            it.loadUrl(mUrl)
            Log.d("myTag", mUrl); //is called once 
        })

How can I call the Log.d or any other function on urlredirect? Now it's called only once, so I can browse through the web, but I can't mutate any states or whatever.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1742389112a211150.html

最新回复(0)