title: Can not use BindingAdapter in Kotlin
body: <p>I used to create <code>DataBindingAdapter</code> for creating custom xml attributes in data binding.</p>
  
  <pre><code>object DataBindingAdapter {
      @BindingAdapter("android:src")
      fun setImageByRes(imageView: ImageView, @DrawableRes resId: Int) {
          imageView.setImageResource(resId)
      }
  }
  </code></pre>
  
  <p>It was <strong>working well</strong> <strong>in Java</strong>. <strong>But not working</strong> <strong>in kotlin</strong>. </p>
  
  <p>As I understand object in kotlin are similer to static method of Java. But its not working in data binding.</p>
  
  <blockquote>
    <p>java.lang.IllegalStateException: Required DataBindingComponent is null in class FragmentBottomBarBinding. A BindingAdapter in
    acr.browser.lightning.utils.DataBindingAdapter is not static and
    requires an object to use, retrieved from the DataBindingComponent. If
    you don't use an inflation method taking a DataBindingComponent, use
    DataBindingUtil.setDefaultComponent or make all BindingAdapter methods
    static.</p>
  </blockquote>