error: constructor FirebaseListAdapter in class FirebaseListAdapter cannot be applied to given types;
required: FirebaseListOptions
found: Chat,Class,int,DatabaseReference
reason: actual and formal argument lists differ in length
where T is a type-variable:
T extends Object declared in class FirebaseListAdapter
private void displayChat() {
listMessages = findViewById(R.id.messages);
adapter = new FirebaseListAdapter<Message>(this, Message.class, R.layout.item, mDatabase.child("chat")) {
@Override
protected void populateView(View v, Message model, int position) {
textMessage = v.findViewById(R.id.textMessage);
userName = v.findViewById(R.id.userName);
textMessage.setText(model.getTextMessage());
userName.setText(nameU);
}
};
listMessages.setAdapter(adapter);
}