2016-05-18 4 views
0

すべてのものがうまくいきますが、リストは追加されますが、新しい子供を追加するときには、私はR.layout.simple_list_item_1を変更しようとしましたが、仕事firebaselistアダプターはテキストを見ることができません

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); 

答えて

2

あなたはviewsの値を渡すためにpopulateView()を実装する必要があります。

protected void populateView(View view, String s, int i) { 
    ((TextView) view.findViewById(android.R.id.text1)).setText(s); 
} 
関連する問題