Image Glide

image-glide

Image loading based on Glide library

final Markwon markwon = Markwon.builder(context)
        // automatically create Glide instance
        .usePlugin(GlideImagesPlugin.create(context))
        // use supplied Glide instance
        .usePlugin(GlideImagesPlugin.create(Glide.with(context)))
        // if you need more control
        .usePlugin(GlideImagesPlugin.create(new GlideImagesPlugin.GlideStore() {
            @NonNull
            @Override
            public RequestBuilder<Drawable> load(@NonNull AsyncDrawable drawable) {
                return Glide.with(context).load(drawable.getDestination());
            }

            @Override
            public void cancel(@NonNull Target<?> target) {
                Glide.with(context).clear(target);
            }
        }))
        .build();
Last Updated: 6/26/2019, 5:57:33 PM