recyclerview does not disburse the image

You need an seperate item for the image. e.g. create a file in layouts item_manga.xml with

<ImageView
    android:id="@+id/mangaImage"
    android:layout_width="381dp"
    android:layout_height="650dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

And your viewholder should look somehow like this

 @Override
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType)
{
    View itemView = LayoutInflater.from(viewGroup.getContext())
            .inflate(R.layout.item_manga, viewGroup, false);
    return new ViewHolder(itemView);
}

I have no experience with Glide, so I cannot say anything about it. But you can try it with a local image to see if it works

holder.image.setImageBitmap(bitmap)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top