I am developing an app in which the users can have multiple lists. My Firebase database looks like this:
The model that i use is this:
public class UserModel { private String userId; private String userName; private String userEmail; private HashMap lists; public UserModel() {} public void setUserId(String userId) {this.userId = userId;} public String getUserId() {return userId;} public void setUserName(String userName) {this.userName = userName;} public String getUserName() {return userName;} public void setUserEmail(String userEmail) {this.userEmail = userEmail;} public String getUserEmail() {return userEmail;} public void setLists(HashMap lists) {this.lists = lists;} public HashMap getLists() {return lists;}
} ,> ,> ,>
For displaying the lists, i use a FirebaseListAdapter
and a ListView
. If i use the code like this:
DatabaseReference listsRef = usersRef.child(userId).child("lists");
adapter = new FirebaseListAdapter
I get this error: Error:(221, 31) error: no suitable constructor found for FirebaseListAdapter
All i want to do, is to display the key
and the value
using HashMap
. Where am i wrong?
Thanks in advance!