Hello guys :slightly_smiling_face: I'm trying to u...
# android
t
Hello guys 🙂 I'm trying to use databinding to set an "empty" view when RecyclerView is empty but I can't get it to work.. I use
DataBindingUtil.setContentView(context as Activity, R.layout.list_fragment).adapter
to bind my adapter variable in my list fragment to the xml variable (
<data><variable name="adapter" type="trubesv.kotlist.MyListAdapter"/></data>
) so I can use
itemCount
setContentView
complains about wanting an explicit type like
ViewDataBinding
but when I put this one I no longer have access to
adapter
Am I doing something wrong? Could you point me in the right direction please? Thanks!
stackoverflow 2