title: how to show profile pictures of friends in a list view?
body: <p>i want to add profile pictures of friends in a list view along with their names. i am using the code which gives me friends name in list view. but i don't know how to show their profile pictures.i have used a login button and on its click event friends list will open. can anybody please tell.? here is the code that i have used</p>
  
  <pre><code>     public class LoginActivity extends Activity{
  
         public static final String APP_ID = "*************";
         private Facebook facebook = new Facebook(APP_ID);
         private AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook);
        private ProgressDialog mProgress;
        private Handler mHandler = new Handler();
        private ProgressDialog mSpinner;
        private Handler mRunOnUi = new Handler();
        String FILENAME = "AndroidSSO_data";
        private SharedPreferences mPrefs;
  
        public static ArrayList&lt;String&gt; friends ;
        String _error;
  
          public byte[] picture;
          public Bitmap pictureBitmap;
          TextView tv;
           Button loginButton;
          private UiLifecycleHelper uiHelper;
          private ContextWrapper uiActivity;
  
         @Override
              public void onCreate(Bundle savedInstanceState) {
                      super.onCreate(savedInstanceState);
                          this.requestWindowFeature(Window.FEATURE_NO_TITLE);
                      getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
          setContentView(R.layout.login);
         friends= new ArrayList&lt;String&gt;();
  
        tv=(TextView)LoginActivity.this.findViewById(R.id.textview1);
                              loginButton=(Button)findViewById(R.id.button_login);
  
                      loginButton.setOnClickListener(new View.OnClickListener() {
  
                        @Override
                            public void onClick(View v) {
  
                          if (! facebook.isSessionValid()) {         
                            facebook.authorize(LoginActivity.this, PERMISSIONS, new LoginDialogListener()); 
                          }
                       }  
                });
              }   
  
                      public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
          Log.d("FB Demo App", "onActivityResult(): " + requestCode);
                     facebook.authorizeCallback(requestCode, resultCode, data);
                   }
  
                       private class LoginDialogListener implements DialogListener {
  
             public void onComplete(Bundle values) {
         saveCredentials(facebook);
       getAlbumsData task = new getAlbumsData();           
            task.execute();
        mHandler.post(new Runnable() {
          public void run() {
  
                                   mAsyncRunner.request("me/friends", new FriendsRequestListener());
  
                                       }
                               });
                               }
  
                         private void saveCredentials(Facebook facebook) {
           }
          public void onFacebookError(FacebookError error) {
                             showToast("Authentication with Facebook failed!");
                         }
  
                         public void onError(DialogError error) {
                             showToast("Authentication with Facebook failed!");
                         }
  
                         public void onCancel() {
                             showToast("Authentication with Facebook cancelled!");
                         }
                     }
                  public void showToast(String string) {
           }
       public class getAlbumsData {
  
                              public void execute() {
          }   }
       private class FriendsRequestListener implements RequestListener {
                        String friendData;
         //Method runs when request is complete
                        public void onComplete(String response, Object state) {
                            Log.v("", "FriendListRequestONComplete");
  
                            friendData = response; 
                            Log.v("friendData--", ""+friendData);
         LoginActivity.this.runOnUiThread(new Runnable() {
           public void run() {
              try {
          //Parse JSON Data
          JSONObject json;
              json = Util.parseJson(friendData);
  
     JSONArray friendArray = json.getJSONArray("data");
       Log.v("friendArray--", ""+friendArray);
      for(int i = 0; i&lt; friendArray.length(); i++) {
    JSONObject frnd_obj = friendArray.getJSONObject(i);
                                            friends.add(frnd_obj.getString("name"));
                                        }
  Intent ide = new Intent(LoginActivity.this,FrndActivity.class);
   ide.putStringArrayListExtra("friends", friends);
    startActivity(ide); 
  } 
  catch (JSONException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                    } catch (FacebookError e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                    }
                                }
                            });
                        }
  
                        }
  
  
               }
  </code></pre>