i want android webview data binding in mvvm pattern
my code (view model)
companion object {
@JvmStatic
@BindingAdapter("loadUrl")
fun WebView.setUrl(url: String) {
this.loadUrl(url)
}
}
xml
<WebView
android:id="@+id/webViewTerm"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:loadUrl="@{signUpViewModel.url}"
/>
The binding was successful,
but I want to add an extra header , I don't know how to put the data I want in that object bound to the companion object
Could you give me a little hint for me?