Ashrik Ahamed
Ashrik Ahamed

Reputation: 445

Glide is not showing images

This one works in activity.this one load the image from firebase to recyclerview:

            Glide.with(PURPLE_MARKET.this).load(productsModel.getImage()).
                    placeholder(R.drawable.loading).into(holder.producticon);

And in a fragment datas are loading perfectly from firebase to recyclerview:

            holder.titletv.setText(productsModel.getProductName());
            holder.pricetv.setText("Rs." + productsModel.getPrice() + ".00");

The problem starts with loading images to the fragment from firebase,here is the code:

            Glide.with(getActivity())
                    .load(productsModel.getImage())
                    .placeholder(R.drawable.loading)
                    .into(holder.imageFav);

if you need more updates,please tell me in the comment, Please give me a solution,i am stucking...

Upvotes: 0

Views: 531

Answers (1)

Sam Chen
Sam Chen

Reputation: 8847

Try Glide.with(getActivity().getContext()).

Upvotes: 1

Related Questions