nohana / Laevatein

Photo image selection activity set library. Currently under development.
247 stars 45 forks source link

Use Glide instead of Picasso #72

Closed ghost closed 6 years ago

ghost commented 6 years ago

Overview

Use Glide instead of Picasso.

This PR implements it using Glide Generated API. If do not use this API, it will be as follows, but since it is not intuitive, I use Generated API. https://github.com/nohana/Laevatein/blob/9359885155a3e34839addb539f6eba59400a3a38/laevatein/src/main/java/com/laevatein/internal/ui/adapter/AlbumPhotoAdapter.java#L89-L92

↓↓↓↓↓↓↓↓↓

RequestOptions options = new RequestOptions();
options.fitCenter()
options.centerCrop()

Glide.with(mContext).load(item.buildContentUri())
       .apply(options)
       .into(holder.thumbnail);

Other

Since Glide v4.4 depends, support-fragment:27.0.1 is exclude. https://github.com/nohana/Laevatein/blob/9359885155a3e34839addb539f6eba59400a3a38/laevatein/build.gradle#L31

Links

Github https://github.com/bumptech/glide Document https://bumptech.github.io/glide GenerateAPI doc https://bumptech.github.io/glide/doc/generatedapi.html

ghost commented 6 years ago

@hiroyuki-seto Please check this PR~.

hiroyuki-seto commented 6 years ago

Coooool!!!!!!