title: android listview not populating
body: <p>What i am doing is getting friends list from facebook and trying to populate list view with friends name and his profile pic but no exception and error coming in logcat list is getting size of 56 and data is in the array list but not populating on UI don't know why kindly suggest me the solution,here is my activity getFriendList Function code:</p>
  
  <pre><code>public List&lt;Friend&gt; getFriendList(){
  
          Request request = Request.newMyFriendsRequest(Session.getActiveSession(), new Request.GraphUserListCallback() {
  
              @Override
              public void onCompleted(List&lt;GraphUser&gt; users, Response response) {
                  // TODO Auto-generated method stub
                  for(int i=0; i&lt;users.size();i++)
                  {
                  GraphUser user =    users.get(i);
                  Friend objFriend = new Friend();
                  objFriend.setFriendID(user.getId());
                  objFriend.setFriendName(user.getName());
                  //objFriend.setFriendPic(user.g)
                  //objFriend.setFriendPic("http://graph.facebook.com/" + objFriend.getFriendID() + "/picture");
                  friendsList.add(objFriend);
                  Log.d("Friend's Id", objFriend.getFriendID());
                  Log.d("Friend's Name", objFriend.getFriendName());
                  //Log.d("Friend's Pic", objFriend.getFriendPic());
                  Log.d("Friend's List Count", Integer.toString(friendsList.size()));
                  }
              }
          });
          Request.executeBatchAsync(request);
          return friendsList;
  }
  </code></pre>
  
  <p>and here is my onCreate function:</p>
  
  <pre><code>@Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.friends_list);
          list = (ListView)findViewById(R.id.listview_friends);
          friendsList = getFriendList();
          friendAdapter = new FriendAdapter(this, R.layout.activity_friends, friendsList);
          list.setAdapter(friendAdapter);
      }
  </code></pre>
  
  <p>here is my custom adapter code:</p>
  
  <pre><code>public class FriendAdapter extends ArrayAdapter&lt;Friend&gt;
      {
          Context context;
          Friends holder;
          int layoutResourceId;
          List&lt;Friend&gt; friendList;
          Bitmap profilePhoto;
  
          public FriendAdapter(Context context, int layoutResourceId,List&lt;Friend&gt; friendList)
          {
              super(context, layoutResourceId, friendList);           
              this.context=context;
              this.layoutResourceId=layoutResourceId;
              this.friendList=friendList;
          }
  
  
          @Override
          public View getView(int position,View convertView,ViewGroup parent)
          {
              View row=convertView;
  
              if(row==null)
              {
                  LayoutInflater inflater=((Activity)context).getLayoutInflater();
                  row=inflater.inflate(layoutResourceId, parent,false);
  
                  holder=new Friends();
                  //holder.friendProfilePic=(ImageView)row.findViewById(R.id.ImageViewfriendProfilePic);
                  holder.friendName = (TextView)row.findViewById(R.id.textViewFriendsName);
  
                  row.setTag(holder);
              }
              else
              {
                  holder=(Friends)row.getTag();
              }
  //      
              holder.friendName.setText(friendList.get(position).getFriendName());
              //holder.friendProfilePic.setImageBitmap(profilePhoto);
  
              return row;
          }
  </code></pre>
  
  <p>here is my xml layout friends_list.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;ListView
          android:id="@+id/listview_friends"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
      &lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and here is activity_friends.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
  
          &lt;ImageView
          android:id="@+id/ImageViewfriendProfilePic"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="10dip"
          android:src="@drawable/com_facebook_button_grey_focused" /&gt;
  
      &lt;TextView
          android:id="@+id/textViewFriendsName"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="100dip"
          android:layout_marginTop="20dip"
          android:text="TextView" /&gt;
      &lt;/RelativeLayout&gt;
  
  
  
  &lt;/LinearLayout&gt;
  </code></pre>