title: How to update Progress Bar Percentage with Data Binding
body: <p>I am unable to update ProgressBar progress with data binding. </p>
  
  <p>Here's what I am doing - </p>
  
  <ul>
  <li>I have a model for holding ProgressBar current progress.</li>
  </ul>
  
  <p><strong>ModelProgress.java</strong></p>
  
  <pre><code>public class ModelProgress extends BaseObservable {
      private int total;
      private int current;
  
      public void setCurrent(int current) {
          this.current = current;
          notifyPropertyChanged(BR.progress);
      }
  
      @Bindable
      public int getProgress() {
          return (current / total) * 100;
      }
  }
  </code></pre>
  
  <p><strong>Please Note</strong> I have made <code>getProgress() @Bindable</code> and notifying <code>BR.progress</code> on updation of value <code>current</code>. So that UI attached to <code>BR.progress</code> update when change in variable <code>current</code>.</p>
  
  <p>In XML I tried to attach <code>ProgressBar</code> with variable <code>progress</code>.</p>
  
  <pre><code>&lt;ProgressBar
      style="@style/Widget.AppCompat.ProgressBar.Horizontal"
      android:progress="@{model.progress}"
      tools:progress="50" /&gt;
  </code></pre>
  
  <h3>Problem</h3>
  
  <p>It's all set for me. Now when I call setCurrent() method, it should reflect on UI. Like <code>binding.getModel().setCurrent(50);</code>. But it doesn't.</p>