我想从 facebook 加载图像并填充到列表视图中,我能够获取朋友列表及其信息,但我想设置图像我得到 getChildCount() 0,请帮助,
public static ArrayList<FBUser> fbUserArrayList;
public static Drawable sharedDrawable;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.friends_list_view);
this.setTitle("FB Friend List");
final ListView listView = (ListView) findViewById(R.id.listview);
FriendListAdapter couponsListAdapter = new FriendListAdapter(this,
fbUserArrayList);
listView.setAdapter(couponsListAdapter);
couponsListAdapter.notifyDataSetChanged();
setFbUsersImage(listView,fbUserArrayList);
}
private void setFbUsersImage(final ListView listView,final ArrayList<FBUser> fbUserArrayList) {
// here am getting 0 ???
for (int i = 0; i < listView.getChildCount(); i++) {
////
}
}