Reputation: 1871
I have basic extension util for picasso:
public val Context.picasso: Picasso
get() = Picasso.with(this)
public fun ImageView.load(path: String, request: (RequestCreator) -> RequestCreator) {
request(context.picasso.load(path)).into(this)
}
And when I try to call it from imageview context in adapter it's not recognized.
Same thing with itemView.context.picasso
Thanks!
Upvotes: 2
Views: 1638
Reputation: 15054
I'm pretty sure your extensions are out of scope (in a different package). Import your extensions like so:
import your.package.picasso
import your.package.load
Take a look at the docs for more info.
Upvotes: 1