I created this Binding Adapter
@BindingAdapter("adapter")
public static void setAdapter(RecyclerView view, RecyclerView.Adapter<RecyclerView.ViewHolder> adapter) {
view.setAdapter(adapter);
}
and set in XML
app:adapter="@{com.package.Adapter}"
it gives all kinds of errors with it. What I want is to do the same thing as you can do with LayoutManager in XML like this
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
Do you know how to solve this issue with passing a class?
P.S. I don't want to pass a variable reference in XML, because let's say I want to use only XML.