I want to load an image from an URL into an imageView within a nested RecyclerView. I use the Glide library for that.
@Override
public void onBindViewHolder(@NonNull InnerAdapter.ViewHolder holder, int position) {
holder.textView.setText(movieList.get(position).getName());
Glide.with(context).load("https://image.tmdb.org/t/p/w500" + movieList.get(position).getImage()).into(holder.imageView);
}
I pass the Activity context through the recyclerViews, but when I want to run the app, it fails with this message:
error: cannot access Fragment
Glide.with(context).load("https://image.tmdb.org/t/p/w500" + movieList.get(position).getImage()).into(holder.imageView);
class file for android.support.v4.app.Fragment not found
What can I do to fix that?