title: ImageView shown only in the last row of listview
body: <p>I have an activity with a listview that contains couple of EditText and image view.
  When User is sign up his data (name,phone,profile image etc...) stored in firebase.
  I want the imageview which located in listview row to show the profile image of each user.
  I have the image download Uri and I use picaso to set the profile image to the image view.</p>
  
  <p><strong>The problem is: the profile image shown only in the last row of the listview..</strong></p>
  
  <p>This is how I set the profile image to the ImageView:</p>
  
  <pre><code>public void getProfileImage() {
      mDatabase.child("Users").addValueEventListener(new ValueEventListener() {
              @Override
              public void onDataChange(DataSnapshot dataSnapshot) {
                  for (DataSnapshot ds : dataSnapshot.getChildren()) {
                      User user = ds.getValue(User.class);
                      if (!user.getUserImage().equals("default"))
                          Picasso.with(getContext()).load(user.getUserImage()).into(profileImage);
                  }
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
      }
  </code></pre>
  
  <p>Hope someone can figure out what is the problem.
  Thank you.</p>
  
  <p><strong>Edit:</strong>
  This is the listview adapter:</p>
  
  <pre><code>public class mainScreenAdapter extends ArrayAdapter&lt;TrempData&gt;  {
  
      private TextView  name ,timestamp ,uid, from,to,date,time,myextra ;
      private ImageButton phoneBtn;
      private ImageView timeline, profileImage;
      private int layoutResource;
      private FirebaseAuth firebaseAuth;
      private DatabaseReference mDatabase;
  
  
  
      public mainScreenAdapter(Context context, int layoutResource, ArrayList&lt;TrempData&gt; list) {
          super(context, layoutResource, list);
          this.layoutResource = layoutResource;
          firebaseAuth = FirebaseAuth.getInstance();
          mDatabase = FirebaseDatabase.getInstance().getReference();
  
      }
  
      @Override
      public View getView(final int position, View convertView, ViewGroup parent) {
          View view = convertView;
  
  
          if (view == null) {
              final LayoutInflater Inflater = LayoutInflater.from(getContext());
              view = Inflater.inflate(layoutResource, null);
  
          }
  
          final TrempData data = getItem(position);
          //data.setPos(position);
          //int[] androidColors = getContext().getResources().getIntArray(R.array.androidcolors);
          //int randomAndroidColor = androidColors[new Random().nextInt(androidColors.length)];
  
  
          if (data != null) {
              name = (TextView) view.findViewById(R.id.myname);
              phoneBtn = (ImageButton) view.findViewById(R.id.myphone);
              //myphonestr = (TextView)view.findViewById(R.id.myphonestr);
              timestamp = (TextView) view.findViewById(R.id.mytimestamp);
              uid = (TextView) view.findViewById(R.id.myuid);
              timeline = (ImageView)view.findViewById(R.id.timeline);
              profileImage = (ImageView)view.findViewById(R.id.mycar);
              date = (TextView) view.findViewById(R.id.mydate);
              time = (TextView) view.findViewById(R.id.mytime);
              from = (TextView) view.findViewById(R.id.myfrom);
              to = (TextView) view.findViewById(R.id.myto);
              myextra = (TextView) view.findViewById(R.id.myextra);
              name.setText(data.get_name());
              //name.setTextColor(randomAndroidColor);
              //myphonestr.setText(data.get_phone());
              timestamp.setText(data.get_timestamp());
              uid.setText(data.get_uid());
              date.setText(data.get_date());
              time.setText(data.get_time());
              to.setText(data.get_to());
              from.setText(data.get_from());
              uid.setText(data.get_uid());
              myextra.setText(data.get_extras());
  
              phoneBtn.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent i = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + data.get_phone()));
                      getContext().startActivity(i);
                  }
              });
  
              if(firebaseAuth.getCurrentUser().getUid().equals(uid.getText())){
  
                  phoneBtn.setVisibility(View.GONE);
                  //car.setColorFilter(Color.rgb(255,164,30));
  
              }
              else{
  
                  phoneBtn.setVisibility(View.VISIBLE);
                  //car.setColorFilter(Color.rgb(176,176,176));
  
              }
          }
          getProfileImage();
          return view;
  
      }
  
      public void getProfileImage() {
          mDatabase.child("Users").addValueEventListener(new ValueEventListener() {
              @Override
              public void onDataChange(DataSnapshot dataSnapshot) {
                  for (DataSnapshot ds : dataSnapshot.getChildren()) {
                      User user = ds.getValue(User.class);
                      if (!user.getUserImage().equals("default"))
                          Picasso.with(getContext()).load(user.getUserImage()).into(profileImage);
                  }
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });
      }
  
  }
  </code></pre>
  
  <p><strong>Update:</strong>
  I did what @Danilo de Oliveira suggest me to do and it works but now I have new problem. The profile image is the same in each row although the download image Uri is different in each user in firebase</p>