Android resource linking failed in binding adapter data binding

  android, data-binding, kotlin

I want to set text using binding adapter.Here is the MyBindingAdapter.kt

@BindingAdapter("android:setTitle")
fun setTitle(textView : TextView,text: String){
        textView.text = text
}

in activity_table.xml I used setTitle like this

  <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_column="1"
            android:layout_weight="1"
            android:gravity="center"
            android:setTitle="Hello word"/>

and I getting below error in compile time
and I getting below error at compile time

Source: Android Questions

LEAVE A COMMENT