I have an adapter that displays user name and a user image. My User class has a getter method to get the user id, and the user image uri (from Firebase). But how to set the image to image view? Right now I set the user name simply by using setText:
@Override
public void onBindViewHolder(MyViewHolder holder, int position) {
myHolder = holder;
User user = mDataset.get(position);
myHolder.userNameTextView.setText(user.getUsername());
//how to integrate Glide here? assuming I have a getter method which returns the user image uri as String?
This Glide implementation works for me(on a separate activity, not on the adapter):
Glide.with(this /* context */)
.load(uri)
.into(test);
Now assume I have a getter method in the User class which returns the image Uri, how to integrate it in the OnBindViewHolder? I can't make it work together