最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论