i am newbiew in an android databinding,i wanna use generics type in an databinding layout , is it possible or not please tell me?
JAVA activity
public class SearchableActivity<R> extends ErpActivity<R extends MasterPojo>
{
public void callToBack(R r){
}
}
XML layout
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="task"
type="R extends Masterpojo" />
<variable
name="activity"
type="com.cloud9.erp.activities.SearchableActivity<R>" />
</data>
<TextView
style="@style/valued_style"
android:onClick="@{() -> activity.callToBack(task)}"
android:text="Erp"
android:textColor="@android:color/black"
android:textSize="@dimen/fab_margin" />
</layout>