title: 2 Way databinding for Webview and ProgressBar
body: <p>I am trying to implement 2 way databinding for WebView and Progressbar. </p>
  
  <p>Initially ProgressBar will continue to appear and as soon as webview finishes loading , progress bar should be GONE.</p>
  
  <p>But I am not able to create that binding</p>
  
  <p>I have created Binding adapter for webview to load url and also set WebViewClient to check page loading is finished but cannot update the visibility of progressbar</p>
  
  <p>////////////// Post</p>
  
  <pre><code>@BindingAdapter({"app:webUrl"})
      public void configureWebView(WebView iWebView, String iUrl) {
  
          iWebView.getSettings().setJavaScriptEnabled(true);
          iWebView.setWebViewClient(new WebViewClient() {
  
              @Override
              public void onPageFinished(WebView view, String url) {
                  super.onPageFinished(view, url);
                  // code to set visibility of progress bar
              }
          });
  
          iWebView.loadUrl(iUrl);
      }
  </code></pre>
  
  <p>//////////////////// Layout</p>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"&gt;
  
      &lt;data&gt;
  
          &lt;import type="android.view.View" /&gt;
  
          &lt;variable
              name="newsUrl"
              type="com.example.bindingdemo.data.model.Post" /&gt;
      &lt;/data&gt;
  
  
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;WebView
              android:id="@+id/news_web_view"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_margin="8dp"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintLeft_toLeftOf="parent"
              app:layout_constraintRight_toRightOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              app:webUrl="@{newsUrl.url}" /&gt;
  
          &lt;ProgressBar
              android:id="@+id/news_prog_bar"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:visibility="@{**&lt;WhatConditionToWrite&gt;** ? View.GONE: View.Visible}"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintLeft_toLeftOf="parent"
              app:layout_constraintRight_toRightOf="parent"
              app:layout_constraintTop_toTopOf="parent" /&gt;
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  &lt;/layout&gt;
  </code></pre>