title: Android databinding src ImageView in xml
body: <p>I am showing a list of include items </p>
  
  <pre><code>&lt;include
          layout="@layout/item_tags"
           android:title='@{"text"}'
           android:image='@{"@drawable/ic_write_item.xml"}'/&gt;
  </code></pre>
  
  <p>this layout contains</p>
  
  <pre><code>&lt;layout xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;data&gt;
          &lt;variable
              name="title"
              type="java.lang.String" /&gt;
  
          &lt;variable
              name="image"
              type="java.lang.String" /&gt;
      &lt;/data&gt;
  </code></pre>
  
  <p>...</p>
  
  <pre><code>  &lt;ImageView...
                      android:src="@{image}"/&gt;
  
                  &lt;TextView...
                      android:text="@{title}" /&gt;
  </code></pre>
  
  <p>also created <code>myDatabindingAdapter</code></p>
  
  <pre><code>object DataBindingAdapters {
  
      @BindingAdapter("android:src")
      @JvmStatic
      fun setImageUri(view: ImageView, imageUri: Uri) {
          view.setImageURI(imageUri)
      }
  
      @BindingAdapter("android:src")
      @JvmStatic
      fun setImageDrawable(view: ImageView, drawable: Drawable) {
          view.setImageDrawable(drawable)
      }
  
      @BindingAdapter("android:src")
      @JvmStatic
      fun setImageResource(imageView: ImageView, resource: Int) {
          imageView.setImageResource(resource)
      }
  }
  </code></pre>
  
  <p>and initialized in fragment this way </p>
  
  <pre><code> val binding: FragmentTagsBinding =  DataBindingUtil.inflate(inflater,R.layout.fragment_tags, container,false)
  
          return binding.root
  </code></pre>
  
  <p>When I run it I receive the following error.</p>
  
  <blockquote>
    <p>E/BitmapFactory: Unable to decode stream:
    java.io.FileNotFoundException: @drawable/ic_write_item.xml (No such
    file or directory) W/ImageView: resolveUri failed on bad bitmap uri:
    @drawable/ic_write_item.xml</p>
  </blockquote>
  
  <p>Is it a problem with the adapter? should I send the resource <code>id</code> instead of the file name? </p>
  
  <p>Thanks for any help.</p>