sophin
sophin

Reputation: 623

Overload resolution ambiguity. All these functions match. In Picasso (into) function

I got stuck upon one of the Picasso so-called open fun methods.

I am using URL in my recyclerview to get images. I don't think it is the problem with recyclerview. I think its more likely a bug.

override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
      Picasso.get().load(arrayPlaces[position].url).into(holder.itemView.findViewById(R.id.mainImage))
    }

enter image description here

For Solution I tried:

This

This

This

GitHub : https://github.com/sophin123/RecyclerViewwithImages

Upvotes: 0

Views: 402

Answers (1)

sophin
sophin

Reputation: 623

Solved it by adding ImageView in findViewById<>()

   override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
      Picasso.get().load(arrayPlaces[position].url).into(holder.itemView.findViewById<ImageView>(R.id.mainImage))
    }

Upvotes: 0

Related Questions