我想从facebook加载图像并填充listview,我能够得到朋友列表和他们的信息,但我想设置图像我得到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++) {
////
}
}
Run Code Online (Sandbox Code Playgroud) android ×1