I usually use ArrayAdapter
and i know how to add a new element. Is there any possibility to add a new element into a FirebaseListAdapter
? I have created a simple app in which we can add simple messages. Here is my code:
FirebaseListAdapter firebaseListAdapter = new FirebaseListAdapter<Message>(this, Message.class, R.layout.message_text_view, databaseReference) {
@Override
protected void populateView(View v, Message message, int position) {
TextView messageTextView = (TextView) v.findViewById(R.id.message_text_view);
messageTextView.setText(message.getTextMessage());
}
};
listView = (ListView) findViewById(R.id.list_view);
listView.setAdapter(firebaseListAdapter);
I also want to add images to the app. All i want to, is to add a new element, which is a ImageView
, to the FirebaseListAdapter
. The new element i want to be displayed at the end of the ListView
. How can i do that?