Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Picasso is not using imageView.getContext()?

Stupid question:

if context can be obtained from imageView itself, why bother passing it explicitly? what would be wrong if Picasso did something like this:

Picasso.load(url).into(imageView);

instead of

Picasso.with(context).load(url).into(imageView);

?

like image 228
agamov Avatar asked Jan 12 '23 02:01

agamov


1 Answers

A context is used to initialize the disk cache, load local resources, and communicate with content providers and into isn't always the action method that's invoked. There's also get() and fetch().

like image 145
Jake Wharton Avatar answered Jan 18 '23 08:01

Jake Wharton