title: How to livedata in Imageview src?
body: <p>My viewmodel:</p>
  
  <pre><code>init{
    updateWallPaper()
  }
  
  private var _wallpaper = MutableLiveData&lt;Bitmap&gt;()
      val wallpaper: LiveData&lt;Bitmap&gt;
          get() = _wallpaper
  fun updateWallPaper() {
          val file = appCtx.getWallpaperFile()
          if(file.exists()) {
              _wallpaper.value = BitmapFactory.decodeFile(file.absolutePath)
          }
      }
  </code></pre>
  
  <p>and my home <code>Activity.xml</code>:</p>
  
  <pre><code>&lt;ImageView
              android:id="@+id/imageview_main_home_img"
              android:layout_width="match_parent"
              android:layout_height="324dp"
              android:scaleType="fitXY"
              android:src="@drawable/sample_image"
              app:layout_constraintTop_toTopOf="parent"
              app:load="@{homeViewModel.wallpaper }" /&gt;
  </code></pre>
  
  <p>All I want to do is to change this image somewhere else, and the image src changes in real time.</p>
  
  <p>I tried many ways but failed and I wonder how to apply live data to src.</p>
  
  <p>It's normal to operate onresume, but every time I return to the home, this method runs, so I think it's a waste of memory, so I'm going to change it to binding live data.</p>