title: LiveData doesn't notify UI about changes when used with DataBinding
body: <p>I want to change UI as <code>LiveData</code> changes when used with DataBinding. But as the <code>LiveData</code> is changing it is not reflecting changes in UI.</p>
  
  <p><strong>MainViewModel.java</strong></p>
  
  <pre><code>public class MainViewModel extends AndroidViewModel {
      /**
       * Boolean variable to see whether user is ClockedIn or ClockedOut
       */
      public MutableLiveData&lt;Boolean&gt; isClockedIn;
  
      public MainViewModel(Application application) {
          super(application);
          isClockedIn = new MutableLiveData&lt;&gt;();
          //...
          calculateClockedInOrNot(PreferencesManager.getString(mContext,PreferencesManager.CLOCK_STATUS_KEY));
      }
  
      /**
       * An utility function to calculate whether user is clocked in or clocked out,
       * this function is also called within this ViewModel after an api hit
       *
       * if string == "CLOCKED_OUT" or string == "mobileEventType.CLOCK_OUT" =&gt; user is clocked out
       * else user is clocked in
       */
      private void calculateClockedInOrNot(String string) {
          if (string.equals("CLOCKED_OUT") || string.equals("mobileEventType.CLOCK_OUT")) {
              //user is clocked out
              isClockedIn.setValue(false);
          } else {
              //user is clocked in
              isClockedIn.setValue(true);
          }
      }
      //getter function
      public MutableLiveData&lt;Boolean&gt; isClockedIn() {
          return isClockedIn;
      }
      //other function left for brevity
  }
  </code></pre>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      // Obtain the ViewModel component.
      mainViewModel = ViewModelProviders.of(this).get(MainViewModel.class);
      // Inflate view and obtain an instance of the binding class.
      ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
      // Assign the component to a property in the binding class.
      binding.setData(mainViewModel);
  }
  </code></pre>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:bind="http://schemas.android.com/apk/res-auto"
  
  xmlns:tools="http://schemas.android.com/tools"&gt;
  
  &lt;data&gt;
  
      &lt;variable
          name="data"
          type="com.app.bidunity.viewmodel.MainViewModel" /&gt;
  &lt;/data&gt;
  
  &lt;LinearLayout
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
          &lt;ImageView
              android:id="@+id/imageView"
              android:layout_width="wrap_content"
              android:layout_height="@dimen/img_hight_location"
              android:adjustViewBounds="true"
              android:src="@{data.clockedIn ? @drawable/ic_location_on : @drawable/ic_location_off}"/&gt;
          &lt;!--Other view left for brevity--&gt;
   &lt;/LinearLayout&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.app.bidunity"
          minSdkVersion 17
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
          vectorDrawables.useSupportLibrary = true
      }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
      }
  }
  dataBinding {
      enabled = true
  }
  compileOptions {
      sourceCompatibility = '1.8'
      targetCompatibility = '1.8'
  }
  
  
  }
  
  dependencies {
  def arch_version = "2.0.0-rc01"
  
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation 'androidx.appcompat:appcompat:1.0.0'
  implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  //material library
  implementation 'com.google.android.material:material:1.0.0'
  // ViewModel and LiveData
  implementation "androidx.lifecycle:lifecycle-extensions:$arch_version"
  
  testImplementation 'junit:junit:4.12'
  androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
  }
  </code></pre>
  
  <p>I am using <em>Android studio 3.3 Canary 11</em> with <em>gradle 4.10.1</em> and <code>onclick</code> with databinding is working fine within viewmodel, but even after changing <code>isClockedIn</code> the <code>ImageView</code> is not changing it's drawable. I have tried everything, I even debugged to see if <code>isClockedIn</code> is changing or not in middle of the run, and yes it's value is changing</p>