Skip to content

Instantly share code, notes, and snippets.

@leodufer
Created October 14, 2020 16:46
Show Gist options
  • Select an option

  • Save leodufer/f29fa4050a366be86a830e6b303cf178 to your computer and use it in GitHub Desktop.

Select an option

Save leodufer/f29fa4050a366be86a830e6b303cf178 to your computer and use it in GitHub Desktop.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = convertView;
if(view==null){
view = LayoutInflater.from(context).inflate(R.layout.item_user,null);
}
User user = (User)getItem(position);
TextView loginTextView = view.findViewById(R.id.textViewLogin);
ImageView avatarImageView = view.findViewById(R.id.imageViewAvatar);
loginTextView.setText(user.getLogin());
Picasso.get().load(user.getAvatar_url()).into(avatarImageView);
return view;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment