Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Glide V4 #167

Open
FynnJason opened this issue Aug 4, 2017 · 2 comments
Open

Integrate Glide V4 #167

FynnJason opened this issue Aug 4, 2017 · 2 comments
Labels

Comments

@FynnJason
Copy link

No description provided.

@Saxxhw
Copy link

Saxxhw commented Aug 10, 2017

可以自己实现ImageEngine里的方法
`
public class GlideEngine implements ImageEngine {

@Override
public void loadThumbnail(Context context, int resize, Drawable placeholder, ImageView imageView, Uri uri) {
    // 加载图片
    Glide.with(context)
            .asBitmap()
            .load(uri)
            .apply(new RequestOptions().placeholder(placeholder).override(resize, resize).centerCrop())
            .transition(new BitmapTransitionOptions().crossFade(300))
            .into(imageView);
}

@Override
public void loadGifThumbnail(Context context, int resize, Drawable placeholder, ImageView imageView, Uri uri) {
    Glide.with(context)
            .asBitmap()
            .load(uri)
            .apply(new RequestOptions().placeholder(placeholder).override(resize, resize).centerCrop())
            .transition(new BitmapTransitionOptions().crossFade(300))
            .into(imageView);
}

@Override
public void loadImage(Context context, int resizeX, int resizeY, ImageView imageView, Uri uri) {
    Glide.with(context)
            .load(uri)
            .apply(new RequestOptions().priority(Priority.HIGH).override(resizeX, resizeY).centerCrop())
            .transition(new DrawableTransitionOptions().crossFade(300))
            .into(imageView);
}

@Override
public void loadGifImage(Context context, int resizeX, int resizeY, ImageView imageView, Uri uri) {
    Glide.with(context)
            .asGif()
            .load(uri)
            .apply(new RequestOptions().priority(Priority.HIGH).override(resizeX, resizeY).centerCrop())
            .into(imageView);
}

@Override
public boolean supportAnimatedGif() {
    return true;
}

}`

@gejiaheng gejiaheng changed the title 知乎老哥,Glide已经4.0了,方法名都不一样了 Integrate Glide V4 Sep 21, 2017
This was referenced Sep 21, 2017
@gejiaheng
Copy link
Contributor

gejiaheng commented Sep 21, 2017

A PR has been sent developing this feature, see #114.

moodcal pushed a commit to moodcal/Matisse that referenced this issue Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants