Reputation: 21
every thing works good but the text doens't appear although the list add item when i add to ref a new child, i have tried to change R.layout.simple_list_item_1 but it doesn't work
Firebase ref = new Firebase("https://shoppinglist-fahmi.firebaseio.com/msg");
FirebaseListAdapter<String> listAdapter = new FirebaseListAdapter<String>(this,String.class, android.R.layout.simple_list_item_1,ref) {
@Override
protected void populateView(View view, String s, int i) {
}
};
listView.setAdapter(listAdapter);
Upvotes: 0
Views: 53
Reputation: 599621
You will need to implement populateView()
to pass the value of s
into the view
:
protected void populateView(View view, String s, int i) {
((TextView) view.findViewById(android.R.id.text1)).setText(s);
}
Upvotes: 2