square/picasso — pull request #666 by lucasr (2014-09-23 01:33:30+00:00)
Title: Implement support for request priorities

Not sure if you've considered something like this in the past but here it is. This patch implements request priority support in Picasso. This feature can be especially handy when you have UIs with lots of images and you want to have tighter control over which images should load first. This is inspired by Volley's API.

It adds a new API in `RequestCreator` to define the request priority:

```java
Picasso.with(context)
.load("http://example.com/image.jpg")
.priority(HIGH)
.into(someImageView);
```

Priority can be `LOW`, `NORMAL`, `HIGH`, or `IMMEDIATE`. `BitmapHunters` compute their priority in the executor by taking the highest priority of its attached requests. For example, if a `BitmapHunter` has two attached `Actions`, one `LOW` and and one `HIGH` priority, its priority will be `HIGH`.