Temporarily disable data binding
<p>I'm building a app in Android using data bindings.</p>

<p>A have a SeekBar which is updated automatically from the background.</p>

<pre><code>&lt;SeekBar
     ...
     android:progress="@{objectModel.progressValue}" /&gt;
</code></pre>

<p>It is working fine, but the problem is if I'm tracking the seekbar, and the background updates the value, mess up the tracking action.</p>

<p>I believe the best way is to disable the data binding temporarily, like below, but I don't know how to do that:</p>

<pre><code>        mySeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {

            // restore the data binding

        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {

            // temporarily disable the UI update

        }

        @Override
        public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {
            // TODO: Auto-generated method stub
        }

        });
</code></pre>

<p>If someone could explain to me how to do that, or give me some example code, that would be appreciated. Thanks!</p>