100% working solution, i am using below ans
binding!!.webView.webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
if(url.contains("https")){ // idea1 : back button to exit!
// finish()
}
return true
}
override fun onPageFinished(view: WebView, url: String) {
// idea 2: to hide button icon & background
binding!!.webView.loadUrl("javascript:(function() { " +
"document.getElementsByClassName('ndfHFb-c4YZDc-GSQQnc-LgbsSe ndfHFb-c4YZDc-to915-LgbsSe VIpgJd-TzA9Ye-eEGnhe ndfHFb-c4YZDc-LgbsSe')[0].style.display='none'; " +
"document.getElementsByClassName('ndfHFb-c4YZDc-Wrql6b')[0].setAttribute('style','width:0px');})()")
}
}
xml: idea 3
<WebView
android:layout_marginStart="-30dp"
android:layout_marginEnd="-30dp"
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Output: