I\'m not using FirebaseAdapter
or any Firebase-UI
dependency, I have made this completly native for now, but I\'m getting a problem at
To solve this, you need to change the following line of code:
mRootDatabase = getAdapter(mContext).getItem(position);
to
mRootDatabase = adapter.getRef(position);
In which adapter
variable is the actual adapter that you are using to display the data.
Edit:
You cannot use getRef()
method, unless you are using Firebase-UI library. You cannot get the DatabaseReference
object from the ArrayAdapter
object. None of the methods inside this class return a DatabaseReference
object. The only way in which you can achieve this is to use Firebase-UI library.
It looks like you're trying to assign a Pojo to a Database Reference, instead you would need to assign it to the actual pojo and reference it that way Something like this
UserPojo User = adapter.getItem(position);